22 #include "wine/port.h" 31 #define WIN32_NO_STATUS 51 static const char *
const debug_classes[] = {
"fixme",
"err",
"warn",
"trace" };
53 #define MAX_DEBUG_OPTIONS 256 77 const char *
name = p1;
91 if (opt)
return opt->
flags;
100 unsigned char set,
unsigned char clear )
161 unsigned char set = 0, clear = 0;
173 if (
len != (
p - opt))
continue;
176 if (*
p ==
'+')
set |= 1 <<
i;
177 else clear |= 1 <<
i;
186 if (*
p ==
'-') clear = ~0;
189 if (*
p ==
'+' || *
p ==
'-')
p++;
250 if (
strcmp(wine_debug,
"wine") == 0)
255 if (
strcmp(wine_debug,
"extended") == 0 ||
256 strcmp(wine_debug,
"ext") == 0)
338 static char *
list[32];
359 static const char hex[16] =
"0123456789abcdef";
365 if (!
str)
return "(null)";
377 unsigned char c = *
str++;
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;
386 if (
c >=
' ' &&
c <= 126)
418 if (!
str)
return "(null)";
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;
445 if (
c >=
' ' &&
c <= 126)
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
static void debug_init(void)
#define memmove(s1, s2, n)
_In_ __drv_aliasesMem PSTRING Prefix
static void parse_options(const char *str)
int wine_dbg_printf(const char *format,...)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
_Check_return_ _CRTIMP size_t __cdecl strcspn(_In_z_ const char *_Str, _In_z_ const char *_Control)
long interlocked_xchg_add(long *dest, long incr)
static char * get_temp_buffer(size_t size)
DWORD WINAPI GetLastError(VOID)
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,...)
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char const char UINT32 ComponentId
void __wine_dbg_set_functions(const struct __wine_debug_functions *new_funcs, struct __wine_debug_functions *old_funcs, size_t size)
static const char hex[16]
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
#define sprintf(buf, format,...)
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
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)
#define MAX_DEBUG_OPTIONS
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 struct __wine_debug_channel debug_options[MAX_DEBUG_OPTIONS]
static const char * default_dbgstr_wn(const WCHAR *str, int n)
const char * wine_dbgstr_wn(const WCHAR *s, int n)
ULONG NTAPI vDbgPrintExWithPrefix(IN LPCSTR Prefix, IN ULONG ComponentId, IN ULONG Level, IN LPCSTR Format, IN va_list ap)
_Out_ PCLIENT_ID ClientId
#define GetEnvironmentVariableA(x, y, z)
static const char *const debug_classes[]
static DWORD DWORD * dwLength
static unsigned char default_flags
static struct __wine_debug_functions funcs
WINE_DECLARE_DEBUG_CHANNEL(pid)
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 __cdecl cmp_name(const void *p1, const void *p2)
int wine_dbg_log(enum __wine_debug_class cls, struct __wine_debug_channel *channel, const char *func, const char *format,...)
unsigned char __wine_dbg_get_channel_flags(struct __wine_debug_channel *channel)
#define memcpy(s1, s2, n)
static void release_temp_buffer(char *buffer, size_t size)
static int nb_debug_options
static void add_option(const char *name, unsigned char set, unsigned char clear)
const char * wine_dbg_sprintf(const char *format,...)
static unsigned __int64 next
FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
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
int __wine_dbg_set_channel_flags(struct __wine_debug_channel *channel, unsigned char set, unsigned char clear)
char * strchr(const char *String, int ch)
static const char * default_dbgstr_an(const char *str, int n)
void int int ULONGLONG int va_list * ap
char * strcpy(char *DstString, const char *SrcString)
int strcmp(const char *String1, const char *String2)
static __ms_va_list valist
const char * wine_dbgstr_an(const char *s, int n)
static int default_dbg_vprintf(const char *format, va_list args)