ReactOS 0.4.17-dev-966-gf06eace
debug.c
Go to the documentation of this file.
1/*
2 * Management of the debugging channels
3 *
4 * Copyright 2000 Alexandre Julliard
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#include "wine/config.h"
22#include "wine/port.h"
23
24#include <stdlib.h>
25#include <stdio.h>
26#include <stdarg.h>
27#include <string.h>
28#include <ctype.h>
29#include <excpt.h>
30
31#define WIN32_NO_STATUS
32#include "wine/debug.h"
33#include "wine/library.h"
34
35#include "winternl.h"
36
39
40static const char * const debug_classes[] = { "fixme", "err", "warn", "trace" };
41
42#define MAX_DEBUG_OPTIONS 256
43
44static unsigned char default_flags = (1 << __WINE_DBCL_ERR) | (1 << __WINE_DBCL_FIXME);
45static int nb_debug_options = -1;
47
49
50static void debug_init(void);
51
52
53/* Wine format */
55 const char *file, const char *func, const int line, const char *format, va_list args );
56/* ReactOS format (default) */
58 const char *file, const char *func, const int line, const char *format, va_list args );
59/* Extended format */
61 const char *file, const char *func, const int line, const char *format, va_list args );
62
63
64static int __cdecl cmp_name( const void *p1, const void *p2 )
65{
66 const char *name = p1;
67 const struct __wine_debug_channel *chan = p2;
68 return strcmp( name, chan->name );
69}
70
71/* get the flags to use for a given channel, possibly setting them too in case of lazy init */
73{
74 if (nb_debug_options == -1) debug_init();
75
77 {
79 sizeof(debug_options[0]), cmp_name );
80 if (opt) return opt->flags;
81 }
82 /* no option for this channel */
83 if (channel->flags & (1 << __WINE_DBCL_INIT)) channel->flags = default_flags;
84 return default_flags;
85}
86
87/* set the flags to use for a given channel; return 0 if the channel is not available to set */
89 unsigned char set, unsigned char clear )
90{
91 if (nb_debug_options == -1) debug_init();
92
94 {
96 sizeof(debug_options[0]), cmp_name );
97 if (opt)
98 {
99 opt->flags = (opt->flags & ~clear) | set;
100 return 1;
101 }
102 }
103 return 0;
104}
105
106/* add a new debug option at the end of the option list */
107static void add_option( const char *name, unsigned char set, unsigned char clear )
108{
109 int min = 0, max = nb_debug_options - 1, pos, res;
110
111 if (!name[0]) /* "all" option */
112 {
113 default_flags = (default_flags & ~clear) | set;
114 return;
115 }
116 if (strlen(name) >= sizeof(debug_options[0].name)) return;
117
118 while (min <= max)
119 {
120 pos = (min + max) / 2;
122 if (!res)
123 {
124 debug_options[pos].flags = (debug_options[pos].flags & ~clear) | set;
125 return;
126 }
127 if (res < 0) max = pos - 1;
128 else min = pos + 1;
129 }
130 if (nb_debug_options >= MAX_DEBUG_OPTIONS) return;
131
132 pos = min;
134 (nb_debug_options - pos) * sizeof(debug_options[0]) );
136 debug_options[pos].flags = (default_flags & ~clear) | set;
138}
139
140/* parse a set of debugging option specifications and add them to the option list */
141static void parse_options( const char *str )
142{
143 char *opt, *next, *options;
144 unsigned int i;
145
146 if (!(options = _strdup(str))) return;
147 for (opt = options; opt; opt = next)
148 {
149 const char *p;
150 unsigned char set = 0, clear = 0;
151
152 if ((next = strchr( opt, ',' ))) *next++ = 0;
153
154 p = opt + strcspn( opt, "+-" );
155 if (!p[0]) p = opt; /* assume it's a debug channel name */
156
157 if (p > opt)
158 {
159 for (i = 0; i < sizeof(debug_classes)/sizeof(debug_classes[0]); i++)
160 {
161 size_t len = strlen(debug_classes[i]);
162 if (len != (p - opt)) continue;
163 if (!memcmp( opt, debug_classes[i], len )) /* found it */
164 {
165 if (*p == '+') set |= 1 << i;
166 else clear |= 1 << i;
167 break;
168 }
169 }
170 if (i == sizeof(debug_classes)/sizeof(debug_classes[0])) /* bad class name, skip it */
171 continue;
172 }
173 else
174 {
175 if (*p == '-') clear = ~0;
176 else set = ~0;
177 }
178 if (*p == '+' || *p == '-') p++;
179 if (!p[0]) continue;
180
181 if (!strcmp( p, "all" ))
182 default_flags = (default_flags & ~clear) | set;
183 else
184 add_option( p, set, clear );
185 }
186 free( options );
187}
188
189/*
190 * The syntax of the DEBUGCHANNEL environment variable is:
191 * DEBUGCHANNEL=[class]+xxx,[class]-yyy,...
192 *
193 * For example: DEBUGCHANNEL=+all,warn-heap
194 * turns on all messages except warning heap messages.
195 *
196 * The available message classes are: err, warn, fixme, trace.
197 *
198 * In order to select a different debug trace format, the
199 * DEBUGFORMAT environment variable should be used:
200 *
201 * DEBUGFORMAT=fmt
202 *
203 * where fmt is the format name: 'wine', or 'extended' (abbreviation: 'ext').
204 * If no format or an invalid one is specified, the fall-back default format
205 * is used instead.
206 */
207
208/* initialize all options at startup */
209static void debug_init(void)
210{
211 char *wine_debug;
213 /* GetEnvironmentVariableA will change LastError! */
214 DWORD LastError = GetLastError();
215
216 if (nb_debug_options != -1) return; /* already initialized */
218
219 dwLength = GetEnvironmentVariableA("DEBUGCHANNEL", NULL, 0);
220 if (dwLength)
221 {
222 wine_debug = malloc(dwLength);
223 if (wine_debug)
224 {
225 if (GetEnvironmentVariableA("DEBUGCHANNEL", wine_debug, dwLength) < dwLength)
226 parse_options(wine_debug);
227 free(wine_debug);
228 }
229 }
230
231 dwLength = GetEnvironmentVariableA("DEBUGFORMAT", NULL, 0);
232 if (dwLength)
233 {
234 wine_debug = malloc(dwLength);
235 if (wine_debug)
236 {
237 if (GetEnvironmentVariableA("DEBUGFORMAT", wine_debug, dwLength) < dwLength)
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 }
254 free(wine_debug);
255 }
256 }
257
258 SetLastError(LastError);
259}
260
261/* varargs wrapper for funcs.dbg_vprintf */
262int wine_dbg_printf( const char *format, ... )
263{
264 int ret;
266
268 ret = funcs.dbg_vprintf( format, valist );
269 va_end(valist);
270 return ret;
271}
272
273int __wine_dbg_output( const char *str )
274{
275 return wine_dbg_printf( "%s", str );
276}
277
278/* printf with temp buffer allocation */
279const char *wine_dbg_sprintf( const char *format, ... )
280{
281 static const int max_size = 200;
282 char *ret;
283 int len;
285
287 ret = funcs.get_temp_buffer( max_size );
289 if (len == -1 || len >= max_size) ret[max_size-1] = 0;
290 else funcs.release_temp_buffer( ret, len + 1 );
291 va_end(valist);
292 return ret;
293}
294
295
296/* varargs wrapper for funcs.dbg_vlog */
298 const char *func, const char *format, ... )
299{
300 int ret;
302
303 if (!(__wine_dbg_get_channel_flags( channel ) & (1 << cls))) return -1;
304
306 ret = funcs.dbg_vlog( cls, channel, NULL, func, 0, format, valist );
307 va_end(valist);
308 return ret;
309}
310
311
312/* ReactOS compliant debug format wrapper for funcs.dbg_vlog */
314 const char *file, const char *func, const int line, const char *format, ... )
315{
316 int ret;
318
319 if (!(__wine_dbg_get_channel_flags( channel ) & (1 << cls))) return -1;
320
322 ret = funcs.dbg_vlog( cls, channel, file, func, line, format, valist );
323 va_end(valist);
324 return ret;
325}
326
327
328/* allocate some tmp string space */
329/* FIXME: this is not 100% thread-safe */
330static char *get_temp_buffer( size_t size )
331{
332 static char *list[32];
333 static long pos = 0;
334 char *ret;
335 long idx;
336
337 idx = interlocked_xchg_add( &pos, 1 ) % (sizeof(list)/sizeof(list[0]));
338 if ((ret = realloc( list[idx], size ))) list[idx] = ret;
339 return ret;
340}
341
342
343/* release unused part of the buffer */
344static void release_temp_buffer( char *buffer, size_t size )
345{
346 /* don't bother doing anything */
347}
348
349
350/* default implementation of wine_dbgstr_an */
351static const char *default_dbgstr_an( const char *str, int n )
352{
353 static const char hex[16] = "0123456789abcdef";
354 char *dst, *res;
355 size_t size;
356
357 if (!((ULONG_PTR)str >> 16))
358 {
359 if (!str) return "(null)";
360 res = funcs.get_temp_buffer( 6 );
361 sprintf( res, "#%04x", LOWORD(str) );
362 return res;
363 }
364 if (n == -1) n = (int)strlen(str);
365 if (n < 0) n = 0;
366 size = 10 + min( 300, n * 4 );
367 dst = res = funcs.get_temp_buffer( size );
368 *dst++ = '"';
369 while (n-- > 0 && dst <= res + size - 9)
370 {
371 unsigned char c = *str++;
372 switch (c)
373 {
374 case '\n': *dst++ = '\\'; *dst++ = 'n'; break;
375 case '\r': *dst++ = '\\'; *dst++ = 'r'; break;
376 case '\t': *dst++ = '\\'; *dst++ = 't'; break;
377 case '"': *dst++ = '\\'; *dst++ = '"'; break;
378 case '\\': *dst++ = '\\'; *dst++ = '\\'; break;
379 default:
380 if (c >= ' ' && c <= 126)
381 *dst++ = c;
382 else
383 {
384 *dst++ = '\\';
385 *dst++ = 'x';
386 *dst++ = hex[(c >> 4) & 0x0f];
387 *dst++ = hex[c & 0x0f];
388 }
389 }
390 }
391 *dst++ = '"';
392 if (n > 0)
393 {
394 *dst++ = '.';
395 *dst++ = '.';
396 *dst++ = '.';
397 }
398 *dst++ = 0;
399 funcs.release_temp_buffer( res, dst - res );
400 return res;
401}
402
403
404/* default implementation of wine_dbgstr_wn */
405static const char *default_dbgstr_wn( const WCHAR *str, int n )
406{
407 char *dst, *res;
408 size_t size;
409
410 if (!((ULONG_PTR)str >> 16))
411 {
412 if (!str) return "(null)";
413 res = funcs.get_temp_buffer( 6 );
414 sprintf( res, "#%04x", LOWORD(str) );
415 return res;
416 }
417 if (n == -1)
418 {
419 const WCHAR *end = str;
420 while (*end) end++;
421 n = end - str;
422 }
423 if (n < 0) n = 0;
424 size = 12 + min( 300, n * 5 );
425 dst = res = funcs.get_temp_buffer( size );
426 *dst++ = 'L';
427 *dst++ = '"';
428 while (n-- > 0 && dst <= res + size - 10)
429 {
430 WCHAR c = *str++;
431 switch (c)
432 {
433 case '\n': *dst++ = '\\'; *dst++ = 'n'; break;
434 case '\r': *dst++ = '\\'; *dst++ = 'r'; break;
435 case '\t': *dst++ = '\\'; *dst++ = 't'; break;
436 case '"': *dst++ = '\\'; *dst++ = '"'; break;
437 case '\\': *dst++ = '\\'; *dst++ = '\\'; break;
438 default:
439 if (c >= ' ' && c <= 126)
440 *dst++ = c;
441 else
442 {
443 *dst++ = '\\';
444 sprintf(dst,"%04x",c);
445 dst+=4;
446 }
447 }
448 }
449 *dst++ = '"';
450 if (n > 0)
451 {
452 *dst++ = '.';
453 *dst++ = '.';
454 *dst++ = '.';
455 }
456 *dst++ = 0;
457 funcs.release_temp_buffer( res, dst - res );
458 return res;
459}
460
461
462/* default implementation of wine_dbg_vprintf */
463static int default_dbg_vprintf( const char *format, va_list args )
464{
465 return vDbgPrintExWithPrefix("", -1, 0, format, args);
466}
467
468
469/* default implementation of wine_dbg_vlog */
470/* Wine format */
472 const char *file, const char *func, const int line, const char *format, va_list args )
473{
474 char prefix[256];
475 static const int max_len = sizeof(prefix);
476 int len = 0;
477
478 if (TRACE_ON(pid))
481
482 if (cls < sizeof(debug_classes)/sizeof(debug_classes[0]))
483 len += _snprintf(prefix + len, max_len - len, "%s:%s:%s ", debug_classes[cls], channel->name, func);
484
485 prefix[max_len - 1] = 0;
486 return vDbgPrintExWithPrefix(prefix, -1, 0, format, args);
487}
488
489/* ReactOS format (default) */
491 const char *file, const char *func, const int line, const char *format, va_list args )
492{
493 char prefix[256];
494 static const int max_len = sizeof(prefix);
495 int len = 0;
496
497 if (TRACE_ON(tid))
499
500 if (cls < sizeof(debug_classes)/sizeof(debug_classes[0]))
501 len += _snprintf(prefix + len, max_len - len, "%s:", debug_classes[cls]);
502
503 if (file && line)
504 len += _snprintf(prefix + len, max_len - len, "(%s:%d) ", file, line);
505 else
506 len += _snprintf(prefix + len, max_len - len, "%s:%s: ", channel->name, func);
507
508 prefix[max_len - 1] = 0;
509 return vDbgPrintExWithPrefix(prefix, -1, 0, format, args);
510}
511
512/* Extended format */
514 const char *file, const char *func, const int line, const char *format, va_list args )
515{
516 char prefix[256];
517 static const int max_len = sizeof(prefix);
518 int len = 0;
519
520 if (TRACE_ON(pid) || TRACE_ON(tid))
521 {
522 len += _snprintf(prefix + len, max_len - len, "[%04x:%04x]:",
525 }
526
527 if (cls < sizeof(debug_classes)/sizeof(debug_classes[0]))
528 len += _snprintf(prefix + len, max_len - len, "%s:", debug_classes[cls]);
529
530 if (file && line)
531 len += _snprintf(prefix + len, max_len - len, "(%s:%d):", file, line);
532
533 if (len < max_len)
534 len += _snprintf(prefix + len, max_len - len, "%s:%s ", channel->name, func);
535
536 prefix[max_len - 1] = 0;
537 return vDbgPrintExWithPrefix(prefix, -1, 0, format, args);
538}
539
540/* wrappers to use the function pointers */
541
542const char *wine_dbgstr_an( const char * s, int n )
543{
544 return funcs.dbgstr_an(s, n);
545}
546
547const char *wine_dbgstr_wn( const WCHAR *s, int n )
548{
549 return funcs.dbgstr_wn(s, n);
550}
551
553 struct __wine_debug_functions *old_funcs, size_t size )
554{
555 if (old_funcs) memcpy( old_funcs, &funcs, min(sizeof(funcs),size) );
556 if (new_funcs) memcpy( &funcs, new_funcs, min(sizeof(funcs),size) );
557}
558
559static struct __wine_debug_functions funcs =
560{
567};
ios_base &_STLP_CALL hex(ios_base &__s)
Definition: _ios_base.h:324
#define vsnprintf
Definition: acwin.h:108
static INT max_size
Definition: history.c:51
#define HandleToULong(h)
Definition: basetsd.h:89
Definition: list.h:39
Definition: _set.h:50
#define realloc
Definition: debug_ros.c:6
#define free
Definition: debug_ros.c:5
#define _strdup
Definition: debug_ros.c:7
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
unsigned int idx
Definition: utils.c:40
const char * wine_dbg_sprintf(const char *format,...)
Definition: compat.c:296
#define SetLastError(x)
Definition: compat.h:752
#define TRACE_ON(x)
Definition: compat.h:75
#define WINE_DECLARE_DEBUG_CHANNEL(x)
Definition: compat.h:45
#define GetEnvironmentVariableA(x, y, z)
Definition: compat.h:754
static DWORD DWORD * dwLength
Definition: fusion.c:86
#define __cdecl
Definition: corecrt.h:121
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2807
#define va_end(v)
Definition: stdarg.h:28
#define va_start(v, l)
Definition: stdarg.h:26
static int __cdecl _snprintf(char *buffer, size_t size, const char *format,...) __WINE_CRT_PRINTF_ATTR(3
Definition: stdio.h:507
_ACRTIMP char *__cdecl strchr(const char *, int)
Definition: string.c:3291
_ACRTIMP size_t __cdecl strlen(const char *)
Definition: string.c:1597
_ACRTIMP size_t __cdecl strcspn(const char *, const char *)
Definition: string.c:3498
_ACRTIMP int __cdecl strcmp(const char *, const char *)
Definition: string.c:3324
char * va_list
Definition: vadefs.h:50
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
static LPSTR get_temp_buffer(void)
Definition: dplayx.c:114
return ret
Definition: mutex.c:147
unsigned long DWORD
Definition: ntddk_ex.h:95
GLdouble s
Definition: gl.h:2039
GLuint GLuint end
Definition: gl.h:1545
GLenum func
Definition: glext.h:6028
GLdouble n
Definition: glext.h:7729
GLuint res
Definition: glext.h:9613
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919
const GLubyte * c
Definition: glext.h:8905
GLenum GLenum dst
Definition: glext.h:6340
GLfloat GLfloat p
Definition: glext.h:8902
GLenum GLsizei len
Definition: glext.h:6722
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
Definition: glfuncs.h:248
static TfClientId tid
#define NtCurrentTeb
#define c
Definition: ke_i.h:80
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
#define sprintf
Definition: sprintf.c:45
static va_list valist
Definition: printf.c:46
#define min(a, b)
Definition: monoChain.cc:55
#define LOWORD(l)
Definition: pedump.c:82
short WCHAR
Definition: pedump.c:58
static unsigned __int64 next
Definition: rand_nt.c:6
#define list
Definition: rosglue.h:35
#define wine_dbgstr_wn
Definition: testlist.c:2
const WCHAR * str
strcpy
Definition: string.h:131
__wine_debug_class
Definition: debug.h:52
@ __WINE_DBCL_ERR
Definition: debug.h:54
@ __WINE_DBCL_INIT
Definition: debug.h:59
@ __WINE_DBCL_FIXME
Definition: debug.h:53
#define interlocked_xchg_add
Definition: port.h:348
static void release_temp_buffer(char *buffer, size_t size)
Definition: debug.c:344
int __wine_dbg_set_channel_flags(struct __wine_debug_channel *channel, unsigned char set, unsigned char clear)
Definition: debug.c:88
static const char *const debug_classes[]
Definition: debug.c:40
static void parse_options(const char *str)
Definition: debug.c:141
static unsigned char default_flags
Definition: debug.c:44
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,...)
Definition: debug.c:313
static int nb_debug_options
Definition: debug.c:45
static void debug_init(void)
Definition: debug.c:209
const char * wine_dbgstr_an(const char *s, int n)
Definition: debug.c:542
static void add_option(const char *name, unsigned char set, unsigned char clear)
Definition: debug.c:107
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)
Definition: debug.c:513
#define MAX_DEBUG_OPTIONS
Definition: debug.c:42
static struct __wine_debug_functions funcs
Definition: debug.c:48
static const char * default_dbgstr_an(const char *str, int n)
Definition: debug.c:351
int __wine_dbg_output(const char *str)
Definition: debug.c:273
int wine_dbg_printf(const char *format,...)
Definition: debug.c:262
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)
Definition: debug.c:471
static struct __wine_debug_channel debug_options[MAX_DEBUG_OPTIONS]
Definition: debug.c:46
static int default_dbg_vprintf(const char *format, va_list args)
Definition: debug.c:463
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)
Definition: debug.c:490
void __wine_dbg_set_functions(const struct __wine_debug_functions *new_funcs, struct __wine_debug_functions *old_funcs, size_t size)
Definition: debug.c:552
static const char * default_dbgstr_wn(const WCHAR *str, int n)
Definition: debug.c:405
static int __cdecl cmp_name(const void *p1, const void *p2)
Definition: debug.c:64
int wine_dbg_log(enum __wine_debug_class cls, struct __wine_debug_channel *channel, const char *func, const char *format,...)
Definition: debug.c:297
ULONG NTAPI vDbgPrintExWithPrefix(IN PCCH Prefix, IN ULONG ComponentId, IN ULONG Level, IN PCCH Format, IN va_list ap)
Definition: debug.c:167
HANDLE UniqueThread
Definition: compat.h:826
HANDLE UniqueProcess
Definition: compat.h:825
unsigned char flags
Definition: debug.h:64
char name[15]
Definition: debug.h:65
Definition: match.c:390
Definition: fci.c:123
Definition: parser.c:49
Definition: name.c:39
#define max(a, b)
Definition: svc.c:63
Character const *const prefix
Definition: tempnam.cpp:195
#define bsearch
uint32_t ULONG_PTR
Definition: typedefs.h:65
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3837
#define __wine_dbg_get_channel_flags(channel)
Definition: wine_debug.c:172
_Out_ PCLIENT_ID ClientId
Definition: kefuncs.h:1151