#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 <rtlfuncs.h>
#include <cmfuncs.h>
Go to the source code of this file.
|
| WINE_DECLARE_DEBUG_CHANNEL (pid) |
|
| WINE_DECLARE_DEBUG_CHANNEL (tid) |
|
ULONG NTAPI | vDbgPrintExWithPrefix (IN LPCSTR Prefix, IN ULONG ComponentId, IN ULONG Level, IN LPCSTR Format, IN va_list ap) |
|
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 83 of file debug.c.
84{
86
88 {
91 if (opt)
return opt->
flags;
92 }
93
96}
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 99 of file debug.c.
101{
103
105 {
108 if (opt)
109 {
111 return 1;
112 }
113 }
114 return 0;
115}
◆ __wine_dbg_set_functions()
Definition at line 551 of file debug.c.
553{
556}
#define memcpy(s1, s2, n)
static struct __wine_debug_functions funcs
Referenced by CmdTrace().
◆ add_option()
Definition at line 118 of file debug.c.
119{
121
123 {
125 return;
126 }
128
130 {
134 {
136 return;
137 }
140 }
142
149}
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
#define memmove(s1, s2, n)
#define MAX_DEBUG_OPTIONS
Referenced by parse_options().
◆ cmp_name()
◆ debug_init()
Definition at line 220 of file debug.c.
221{
222 char *wine_debug;
224
226
229
232 {
234 if (wine_debug)
235 {
239 }
240 }
241
244 {
246 if (wine_debug)
247 {
249 {
250 if (
strcmp(wine_debug,
"wine") == 0)
251 {
253 }
254 else
255 if (
strcmp(wine_debug,
"extended") == 0 ||
256 strcmp(wine_debug,
"ext") == 0)
257 {
259 }
260 else
261 {
263 }
264 }
266 }
267 }
268
270}
#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 469 of file debug.c.
470{
472}
ULONG NTAPI vDbgPrintExWithPrefix(IN LPCSTR Prefix, IN ULONG ComponentId, IN ULONG Level, IN LPCSTR Format, IN va_list ap)
◆ default_dbgstr_an()
Definition at line 357 of file debug.c.
358{
359 static const char hex[16] =
"0123456789abcdef";
362
364 {
365 if (!
str)
return "(null)";
369 }
376 {
377 unsigned char c = *
str++;
379 {
380 case '\n': *
dst++ =
'\\'; *
dst++ =
'n';
break;
381 case '\r': *
dst++ =
'\\'; *
dst++ =
'r';
break;
382 case '\t': *
dst++ =
'\\'; *
dst++ =
't';
break;
383 case '"': *
dst++ =
'\\'; *
dst++ =
'"';
break;
384 case '\\': *
dst++ =
'\\'; *
dst++ =
'\\';
break;
385 default:
386 if (
c >=
' ' &&
c <= 126)
388 else
389 {
394 }
395 }
396 }
399 {
403 }
407}
#define sprintf(buf, format,...)
◆ default_dbgstr_wn()
Definition at line 411 of file debug.c.
412{
415
417 {
418 if (!
str)
return "(null)";
422 }
424 {
428 }
435 {
438 {
439 case '\n': *
dst++ =
'\\'; *
dst++ =
'n';
break;
440 case '\r': *
dst++ =
'\\'; *
dst++ =
'r';
break;
441 case '\t': *
dst++ =
'\\'; *
dst++ =
't';
break;
442 case '"': *
dst++ =
'\\'; *
dst++ =
'"';
break;
443 case '\\': *
dst++ =
'\\'; *
dst++ =
'\\';
break;
444 default:
445 if (
c >=
' ' &&
c <= 126)
447 else
448 {
452 }
453 }
454 }
457 {
461 }
465}
◆ extfmt_default_dbg_vlog()
Definition at line 514 of file debug.c.
516{
518
520 {
524 }
525
528
531
533
537}
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 336 of file debug.c.
337{
338 static char *
list[32];
342
346}
#define interlocked_xchg_add
◆ parse_options()
Definition at line 152 of file debug.c.
153{
156
159 {
161 unsigned char set = 0, clear = 0;
162
164
167
169 {
171 {
173 if (
len != (
p - opt))
continue;
175 {
176 if (*
p ==
'+')
set |= 1 <<
i;
177 else clear |= 1 <<
i;
178 break;
179 }
180 }
182 continue;
183 }
184 else
185 {
186 if (*
p ==
'-') clear = ~0;
188 }
189 if (*
p ==
'+' || *
p ==
'-')
p++;
191
194 else
196 }
198}
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 319 of file debug.c.
321{
324
326
331}
static __ms_va_list valist
#define __wine_dbg_get_channel_flags(channel)
◆ rosfmt_default_dbg_vlog()
◆ vDbgPrintExWithPrefix()
◆ 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 59 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 |