#include "wine/config.h"
#include "wine/port.h"
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include <excpt.h>
#include "wine/debug.h"
#include "wine/library.h"
#include "winternl.h"
Go to the source code of this file.
|
| | WINE_DECLARE_DEBUG_CHANNEL (pid) |
| |
| | WINE_DECLARE_DEBUG_CHANNEL (tid) |
| |
| static void | debug_init (void) |
| |
| static int | winefmt_default_dbg_vlog (enum __wine_debug_class cls, struct __wine_debug_channel *channel, const char *file, const char *func, const int line, const char *format, va_list args) |
| |
| static int | rosfmt_default_dbg_vlog (enum __wine_debug_class cls, struct __wine_debug_channel *channel, const char *file, const char *func, const int line, const char *format, va_list args) |
| |
| static int | extfmt_default_dbg_vlog (enum __wine_debug_class cls, struct __wine_debug_channel *channel, const char *file, const char *func, const int line, const char *format, va_list args) |
| |
| static int __cdecl | cmp_name (const void *p1, const void *p2) |
| |
| unsigned char | __wine_dbg_get_channel_flags (struct __wine_debug_channel *channel) |
| |
| int | __wine_dbg_set_channel_flags (struct __wine_debug_channel *channel, unsigned char set, unsigned char clear) |
| |
| static void | add_option (const char *name, unsigned char set, unsigned char clear) |
| |
| static void | parse_options (const char *str) |
| |
| int | wine_dbg_printf (const char *format,...) |
| |
| const char * | wine_dbg_sprintf (const char *format,...) |
| |
| int | wine_dbg_log (enum __wine_debug_class cls, struct __wine_debug_channel *channel, const char *func, const char *format,...) |
| |
| int | ros_dbg_log (enum __wine_debug_class cls, struct __wine_debug_channel *channel, const char *file, const char *func, const int line, const char *format,...) |
| |
| static char * | get_temp_buffer (size_t size) |
| |
| static void | release_temp_buffer (char *buffer, size_t size) |
| |
| static const char * | default_dbgstr_an (const char *str, int n) |
| |
| static const char * | default_dbgstr_wn (const WCHAR *str, int n) |
| |
| static int | default_dbg_vprintf (const char *format, va_list args) |
| |
| const char * | wine_dbgstr_an (const char *s, int n) |
| |
| const char * | wine_dbgstr_wn (const WCHAR *s, int n) |
| |
| void | __wine_dbg_set_functions (const struct __wine_debug_functions *new_funcs, struct __wine_debug_functions *old_funcs, size_t size) |
| |
◆ MAX_DEBUG_OPTIONS
◆ WIN32_NO_STATUS
◆ __wine_dbg_get_channel_flags()
Definition at line 72 of file debug.c.
73{
75
77 {
80 if (opt)
return opt->
flags;
81 }
82
85}
static unsigned char default_flags
static int nb_debug_options
static void debug_init(void)
static struct __wine_debug_channel debug_options[MAX_DEBUG_OPTIONS]
static int __cdecl cmp_name(const void *p1, const void *p2)
◆ __wine_dbg_set_channel_flags()
Definition at line 88 of file debug.c.
90{
92
94 {
97 if (opt)
98 {
100 return 1;
101 }
102 }
103 return 0;
104}
◆ __wine_dbg_set_functions()
Definition at line 540 of file debug.c.
542{
545}
#define memcpy(s1, s2, n)
static struct __wine_debug_functions funcs
Referenced by CmdTrace().
◆ add_option()
Definition at line 107 of file debug.c.
108{
110
112 {
114 return;
115 }
117
119 {
123 {
125 return;
126 }
129 }
131
138}
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
#define memmove(s1, s2, n)
#define MAX_DEBUG_OPTIONS
Referenced by parse_options().
◆ cmp_name()
◆ debug_init()
Definition at line 209 of file debug.c.
210{
211 char *wine_debug;
213
215
218
221 {
223 if (wine_debug)
224 {
228 }
229 }
230
233 {
235 if (wine_debug)
236 {
238 {
239 if (
strcmp(wine_debug,
"wine") == 0)
240 {
242 }
243 else
244 if (
strcmp(wine_debug,
"extended") == 0 ||
245 strcmp(wine_debug,
"ext") == 0)
246 {
248 }
249 else
250 {
252 }
253 }
255 }
256 }
257
259}
#define GetEnvironmentVariableA(x, y, z)
static DWORD DWORD * dwLength
static void parse_options(const char *str)
static int extfmt_default_dbg_vlog(enum __wine_debug_class cls, struct __wine_debug_channel *channel, const char *file, const char *func, const int line, const char *format, va_list args)
static int winefmt_default_dbg_vlog(enum __wine_debug_class cls, struct __wine_debug_channel *channel, const char *file, const char *func, const int line, const char *format, va_list args)
static int rosfmt_default_dbg_vlog(enum __wine_debug_class cls, struct __wine_debug_channel *channel, const char *file, const char *func, const int line, const char *format, va_list args)
DWORD WINAPI GetLastError(void)
Referenced by __wine_dbg_get_channel_flags(), and __wine_dbg_set_channel_flags().
◆ default_dbg_vprintf()
Definition at line 458 of file debug.c.
459{
461}
ULONG NTAPI vDbgPrintExWithPrefix(IN PCCH Prefix, IN ULONG ComponentId, IN ULONG Level, IN PCCH Format, IN va_list ap)
◆ default_dbgstr_an()
Definition at line 346 of file debug.c.
347{
348 static const char hex[16] =
"0123456789abcdef";
351
353 {
354 if (!
str)
return "(null)";
358 }
365 {
366 unsigned char c = *
str++;
368 {
369 case '\n': *
dst++ =
'\\'; *
dst++ =
'n';
break;
370 case '\r': *
dst++ =
'\\'; *
dst++ =
'r';
break;
371 case '\t': *
dst++ =
'\\'; *
dst++ =
't';
break;
372 case '"': *
dst++ =
'\\'; *
dst++ =
'"';
break;
373 case '\\': *
dst++ =
'\\'; *
dst++ =
'\\';
break;
374 default:
375 if (
c >=
' ' &&
c <= 126)
377 else
378 {
383 }
384 }
385 }
388 {
392 }
396}
◆ default_dbgstr_wn()
Definition at line 400 of file debug.c.
401{
404
406 {
407 if (!
str)
return "(null)";
411 }
413 {
417 }
424 {
427 {
428 case '\n': *
dst++ =
'\\'; *
dst++ =
'n';
break;
429 case '\r': *
dst++ =
'\\'; *
dst++ =
'r';
break;
430 case '\t': *
dst++ =
'\\'; *
dst++ =
't';
break;
431 case '"': *
dst++ =
'\\'; *
dst++ =
'"';
break;
432 case '\\': *
dst++ =
'\\'; *
dst++ =
'\\';
break;
433 default:
434 if (
c >=
' ' &&
c <= 126)
436 else
437 {
441 }
442 }
443 }
446 {
450 }
454}
◆ extfmt_default_dbg_vlog()
Definition at line 503 of file debug.c.
505{
507
509 {
513 }
514
517
520
522
526}
static const char *const debug_classes[]
int wine_dbg_printf(const char *format,...)
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
_Out_ PCLIENT_ID ClientId
Referenced by debug_init().
◆ get_temp_buffer()
Definition at line 325 of file debug.c.
326{
327 static char *
list[32];
331
335}
#define interlocked_xchg_add
◆ parse_options()
Definition at line 141 of file debug.c.
142{
145
148 {
150 unsigned char set = 0, clear = 0;
151
153
156
158 {
160 {
162 if (
len != (
p - opt))
continue;
164 {
165 if (*
p ==
'+')
set |= 1 <<
i;
166 else clear |= 1 <<
i;
167 break;
168 }
169 }
171 continue;
172 }
173 else
174 {
175 if (*
p ==
'-') clear = ~0;
177 }
178 if (*
p ==
'+' || *
p ==
'-')
p++;
180
183 else
185 }
187}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
char * strchr(const char *String, int ch)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static unsigned __int64 next
_Check_return_ _CRTIMP size_t __cdecl strcspn(_In_z_ const char *_Str, _In_z_ const char *_Control)
static void add_option(const char *name, unsigned char set, unsigned char clear)
Referenced by debug_init().
◆ release_temp_buffer()
◆ ros_dbg_log()
Definition at line 308 of file debug.c.
310{
313
315
320}
#define __wine_dbg_get_channel_flags(channel)
◆ rosfmt_default_dbg_vlog()
◆ wine_dbg_log()
◆ wine_dbg_printf()
◆ wine_dbg_sprintf()
◆ wine_dbgstr_an()
◆ wine_dbgstr_wn()
◆ WINE_DECLARE_DEBUG_CHANNEL() [1/2]
| WINE_DECLARE_DEBUG_CHANNEL |
( |
pid |
| ) |
|
◆ WINE_DECLARE_DEBUG_CHANNEL() [2/2]
| WINE_DECLARE_DEBUG_CHANNEL |
( |
tid |
| ) |
|
◆ winefmt_default_dbg_vlog()
◆ debug_classes
| const char* const debug_classes[] = { "fixme", "err", "warn", "trace" } |
|
static |
◆ debug_options
◆ default_flags
◆ funcs
Initial value:=
{
}
static LPSTR get_temp_buffer(void)
static void release_temp_buffer(char *buffer, size_t size)
static const char * default_dbgstr_an(const char *str, int n)
static int default_dbg_vprintf(const char *format, va_list args)
static const char * default_dbgstr_wn(const WCHAR *str, int n)
Definition at line 48 of file debug.c.
Referenced by __wine_dbg_set_functions(), add_func_info(), add_function_decl(), build_format_strings(), cff_size_done(), cff_size_init(), cff_size_request(), cff_slot_init(), cid_size_done(), cid_size_init(), cid_size_request(), cid_slot_init(), CreateProxyFromTypeInfo(), CreateStubFromTypeInfo(), debug_init(), default_dbgstr_an(), default_dbgstr_wn(), DispatchEx_GetNextDispID(), extfmt_default_dbg_vlog(), get_iface_info(), ITypeInfoImpl_GetInternalDispatchFuncDesc(), NP_GetEntryPoints(), num_handlers(), psh_globals_funcs_init(), report(), ros_dbg_log(), rosfmt_default_dbg_vlog(), T1_GlyphSlot_Init(), t1_hints_funcs_init(), T1_Size_Done(), T1_Size_Init(), T1_Size_Request(), t2_hints_funcs_init(), tess_callback_begin(), tess_callback_end(), tess_callback_vertex(), test_FakeDLL(), test_LoadFunctionPointers(), test_provider_funcs(), test_utils(), testCertTrust(), testInitialize(), testObjTrust(), wglUseFontBitmaps_common(), wglUseFontOutlines_common(), wine_dbg_log(), wine_dbg_printf(), wine_dbg_sprintf(), wine_dbgstr_an(), wine_dbgstr_wn(), winefmt_default_dbg_vlog(), and write_iface_fs().
◆ nb_debug_options
| int nb_debug_options = -1 |
|
static |