Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
383da68c
Commit
383da68c
authored
Feb 10, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimized debugging API to reduce code size.
parent
fc296da4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
53 changed files
with
224 additions
and
222 deletions
+224
-222
registry.c
dlls/advapi32/registry.c
+2
-1
datetime.c
dlls/comctl32/datetime.c
+5
-4
ipaddress.c
dlls/comctl32/ipaddress.c
+2
-1
trackbar.c
dlls/comctl32/trackbar.c
+2
-1
filedlg95.c
dlls/commdlg/filedlg95.c
+2
-1
dplayx_global.c
dlls/dplayx/dplayx_global.c
+2
-1
dsound_main.c
dlls/dsound/dsound_main.c
+3
-2
lzexpand_main.c
dlls/lzexpand/lzexpand_main.c
+3
-1
misc.c
dlls/ntdll/misc.c
+2
-2
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+2
-2
signal_i386.c
dlls/ntdll/signal_i386.c
+1
-0
compobj.c
dlls/ole32/compobj.c
+5
-5
compositemoniker.c
dlls/ole32/compositemoniker.c
+1
-1
typelib.c
dlls/oleaut32/typelib.c
+3
-2
classes.c
dlls/shell32/classes.c
+2
-1
shellord.c
dlls/shell32/shellord.c
+2
-1
install.c
dlls/version/install.c
+2
-1
resource.c
dlls/version/resource.c
+3
-1
winaspi16.c
dlls/winaspi/winaspi16.c
+1
-0
mcicda.c
dlls/winmm/mcicda/mcicda.c
+1
-0
mcimidi.c
dlls/winmm/mciseq/mcimidi.c
+2
-1
mmio.c
dlls/winmm/mmio.c
+11
-11
mixer.c
dlls/winmm/wineoss/mixer.c
+2
-1
winaspi32.c
dlls/wnaspi32/winaspi32.c
+2
-1
file.c
files/file.c
+2
-1
ddraw.c
graphics/ddraw.c
+2
-1
afm.c
graphics/psdrv/afm.c
+2
-1
ppd.c
graphics/psdrv/ppd.c
+2
-1
ps.c
graphics/psdrv/ps.c
+2
-1
builtin.c
if1632/builtin.c
+1
-0
debugdefs.h
include/debugdefs.h
+0
-0
debugtools.h
include/debugtools.h
+49
-55
miscemu.h
include/miscemu.h
+1
-1
global.c
memory/global.c
+2
-1
heap.c
memory/heap.c
+2
-1
ldt.c
memory/ldt.c
+2
-1
virtual.c
memory/virtual.c
+2
-1
cpu.c
misc/cpu.c
+2
-1
debugstr.c
misc/debugstr.c
+14
-32
error.c
misc/error.c
+1
-0
main.c
misc/main.c
+10
-8
registry.c
misc/registry.c
+2
-1
dpmi.c
msdos/dpmi.c
+1
-1
int2a.c
msdos/int2a.c
+2
-0
int3d.c
msdos/int3d.c
+2
-1
int41.c
msdos/int41.c
+3
-0
int4b.c
msdos/int4b.c
+3
-0
ioports.c
msdos/ioports.c
+1
-0
snoop.c
relay32/snoop.c
+1
-0
make_debug
tools/make_debug
+12
-24
kernel32.c
win32/kernel32.c
+26
-25
event.c
windows/x11drv/event.c
+11
-12
main.c
windows/x11drv/main.c
+1
-10
No files found.
dlls/advapi32/registry.c
View file @
383da68c
...
...
@@ -13,6 +13,7 @@
*/
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include "winbase.h"
...
...
@@ -25,7 +26,7 @@
#include "server.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
reg
)
DEFAULT_DEBUG_CHANNEL
(
reg
)
;
/* Ansi->Unicode conversion without string delimiters */
...
...
dlls/comctl32/datetime.c
View file @
383da68c
...
...
@@ -11,16 +11,17 @@
*
*/
#include <math.h>
#include <string.h>
#include <stdio.h>
#include "winbase.h"
#include "commctrl.h"
#include "datetime.h"
#include "monthcal.h"
#include "debugtools.h"
#include <math.h>
#include <string.h>
DEFAULT_DEBUG_CHANNEL
(
datetime
)
DEFAULT_DEBUG_CHANNEL
(
datetime
);
#define DATETIME_GetInfoPtr(hwnd) ((DATETIME_INFO *)GetWindowLongA (hwnd, 0))
...
...
dlls/comctl32/ipaddress.c
View file @
383da68c
...
...
@@ -23,6 +23,7 @@
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#include "winbase.h"
#include "commctrl.h"
...
...
@@ -30,7 +31,7 @@
#include "heap.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
ipaddress
)
DEFAULT_DEBUG_CHANNEL
(
ipaddress
)
;
#define IPADDRESS_GetInfoPtr(hwnd) ((IPADDRESS_INFO *)GetWindowLongA (hwnd, 0))
...
...
dlls/comctl32/trackbar.c
View file @
383da68c
...
...
@@ -23,13 +23,14 @@
*/
#include <stdio.h>
#include "winbase.h"
#include "commctrl.h"
#include "trackbar.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
trackbar
)
DEFAULT_DEBUG_CHANNEL
(
trackbar
)
;
#define TRACKBAR_GetInfoPtr(wndPtr) ((TRACKBAR_INFO *)GetWindowLongA (hwnd,0))
...
...
dlls/commdlg/filedlg95.c
View file @
383da68c
...
...
@@ -4,6 +4,7 @@
*/
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "winbase.h"
#include "ldt.h"
...
...
@@ -20,7 +21,7 @@
#include "filedlgbrowser.h"
#include "wine/obj_contextmenu.h"
DEFAULT_DEBUG_CHANNEL
(
commdlg
)
DEFAULT_DEBUG_CHANNEL
(
commdlg
)
;
/***********************************************************************
* Data structure and global variables
...
...
dlls/dplayx/dplayx_global.c
View file @
383da68c
...
...
@@ -10,6 +10,7 @@
* dplayx.dll data which is accessible from all processes.
*/
#include <stdio.h>
#include "debugtools.h"
#include "winbase.h"
#include "winerror.h"
...
...
@@ -17,7 +18,7 @@
#include "dplayx_global.h"
DEFAULT_DEBUG_CHANNEL
(
dplay
)
DEFAULT_DEBUG_CHANNEL
(
dplay
)
;
/* FIXME: Need to do all that fun other dll referencing type of stuff */
/* FIXME: Need to allocate a giant static area */
...
...
dlls/dsound/dsound_main.c
View file @
383da68c
...
...
@@ -54,6 +54,7 @@
#include "config.h"
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/fcntl.h>
...
...
@@ -70,7 +71,7 @@
#include "thread.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
dsound
)
DEFAULT_DEBUG_CHANNEL
(
dsound
)
;
/*****************************************************************************
...
...
@@ -1197,7 +1198,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Initialize(
)
{
ICOM_THIS
(
IDirectSoundBufferImpl
,
iface
);
FIXME
(
"(%p,%p,%p):stub
\n
"
,
This
,
dsound
,
dbsd
);
printf
(
"Re-Init!!!
\n
"
);
DPRINTF
(
"Re-Init!!!
\n
"
);
return
DSERR_ALREADYINITIALIZED
;
}
...
...
dlls/lzexpand/lzexpand_main.c
View file @
383da68c
...
...
@@ -9,6 +9,8 @@
#include <string.h>
#include <ctype.h>
#include <sys/types.h>
#include <unistd.h>
#include "windef.h"
#include "winbase.h"
#include "wine/winbase16.h"
...
...
@@ -18,7 +20,7 @@
#include "lzexpand.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
file
)
DEFAULT_DEBUG_CHANNEL
(
file
)
;
/* The readahead length of the decompressor. Reading single bytes
...
...
dlls/ntdll/misc.c
View file @
383da68c
...
...
@@ -40,13 +40,13 @@ void dump_UnicodeString(PUNICODE_STRING us, BOOLEAN showstring)
}
}
LPSTR
debugstr_as
(
PANSI_STRING
us
)
LP
C
STR
debugstr_as
(
PANSI_STRING
us
)
{
if
(
!
us
)
return
NULL
;
return
debugstr_an
(
us
->
Buffer
,
us
->
Length
);
}
LPSTR
debugstr_us
(
PUNICODE_STRING
us
)
LP
C
STR
debugstr_us
(
PUNICODE_STRING
us
)
{
if
(
!
us
)
return
NULL
;
return
debugstr_wn
(
us
->
Buffer
,
us
->
Length
);
...
...
dlls/ntdll/ntdll_misc.h
View file @
383da68c
...
...
@@ -5,8 +5,8 @@
#include "winnt.h"
/* debug helper */
extern
LPSTR
debugstr_as
(
PANSI_STRING
us
);
extern
LPSTR
debugstr_us
(
PUNICODE_STRING
us
);
extern
LP
C
STR
debugstr_as
(
PANSI_STRING
us
);
extern
LP
C
STR
debugstr_us
(
PUNICODE_STRING
us
);
extern
void
dump_ObjectAttributes
(
POBJECT_ATTRIBUTES
ObjectAttributes
);
extern
void
dump_AnsiString
(
PANSI_STRING
as
,
BOOLEAN
showstring
);
extern
void
dump_UnicodeString
(
PUNICODE_STRING
us
,
BOOLEAN
showstring
);
...
...
dlls/ntdll/signal_i386.c
View file @
383da68c
...
...
@@ -11,6 +11,7 @@
#include <errno.h>
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#ifdef HAVE_SYS_PARAM_H
...
...
dlls/ole32/compobj.c
View file @
383da68c
...
...
@@ -31,6 +31,7 @@
# include <netinet/in.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <assert.h>
...
...
@@ -56,7 +57,8 @@
#include "ifs.h"
#include "compobj.h"
DEFAULT_DEBUG_CHANNEL
(
ole
)
DEFAULT_DEBUG_CHANNEL
(
ole
);
/****************************************************************************
* COM External Lock structures and methods declaration
*
...
...
@@ -1958,13 +1960,11 @@ void COM_ExternalLockDump()
{
COM_ExternalLock
*
current
=
elList
.
head
;
printf
(
"
\n
External lock list contains:
\n
"
);
DPRINTF
(
"
\n
External lock list contains:
\n
"
);
while
(
current
!=
EL_END_OF_LIST
)
{
printf
(
"
\t
%p with %lu references count.
\n
"
,
current
->
pUnk
,
current
->
uRefCount
);
DPRINTF
(
"
\t
%p with %lu references count.
\n
"
,
current
->
pUnk
,
current
->
uRefCount
);
/* Skip to the next item */
current
=
current
->
next
;
...
...
dlls/ole32/compositemoniker.c
View file @
383da68c
...
...
@@ -303,7 +303,7 @@ HRESULT WINAPI CompositeMonikerImpl_Load(IMoniker* iface,IStream* pStm)
res=OleLoadFromStream(pStm,&IID_IMoniker,(void**)&This->tabMoniker[This->tabLastIndex]);
#endif
res
=
ReadClassStm
(
pStm
,
&
clsid
);
printf
(
"res=%ld"
,
res
);
DPRINTF
(
"res=%ld"
,
res
);
if
(
FAILED
(
res
))
break
;
...
...
dlls/oleaut32/typelib.c
View file @
383da68c
...
...
@@ -26,6 +26,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "winerror.h"
#include "winreg.h"
/* for HKEY_LOCAL_MACHINE */
...
...
@@ -40,8 +41,8 @@ typedef struct ITypeInfoVtbl ITypeLib_VTable, *LPTYPEINFO_VTABLE ;
typedef
struct
ITypeLibVtbl
*
LPTYPELIB_VTABLE
;
#include "typelib.h"
DEFAULT_DEBUG_CHANNEL
(
ole
)
DECLARE_DEBUG_CHANNEL
(
typelib
)
DEFAULT_DEBUG_CHANNEL
(
ole
)
;
DECLARE_DEBUG_CHANNEL
(
typelib
)
;
/****************************************************************************
* QueryPathOfRegTypeLib16 [TYPELIB.14]
...
...
dlls/shell32/classes.c
View file @
383da68c
...
...
@@ -6,6 +6,7 @@
*/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "debugtools.h"
#include "winerror.h"
#include "winreg.h"
...
...
@@ -15,7 +16,7 @@
#include "shlguid.h"
#include "shresdef.h"
DEFAULT_DEBUG_CHANNEL
(
shell
)
DEFAULT_DEBUG_CHANNEL
(
shell
)
;
#define MAX_EXTENSION_LENGTH 20
...
...
dlls/shell32/shellord.c
View file @
383da68c
...
...
@@ -6,6 +6,7 @@
* 1998 Jrgen Schmied
*/
#include <string.h>
#include <stdio.h>
#include "winerror.h"
#include "winreg.h"
#include "debugtools.h"
...
...
@@ -19,7 +20,7 @@
#include "wine/undocshell.h"
#include "shpolicy.h"
DEFAULT_DEBUG_CHANNEL
(
shell
)
DEFAULT_DEBUG_CHANNEL
(
shell
)
;
/*************************************************************************
* SHChangeNotifyRegister [SHELL32.2]
...
...
dlls/version/install.c
View file @
383da68c
...
...
@@ -6,6 +6,7 @@
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "windef.h"
...
...
@@ -17,7 +18,7 @@
#include "xmalloc.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
ver
)
DEFAULT_DEBUG_CHANNEL
(
ver
)
;
/******************************************************************************
...
...
dlls/version/resource.c
View file @
383da68c
...
...
@@ -8,6 +8,8 @@
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include "neexe.h"
#include "module.h"
...
...
@@ -15,7 +17,7 @@
#include "lzexpand.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
ver
)
DEFAULT_DEBUG_CHANNEL
(
ver
)
;
/***********************************************************************
...
...
dlls/winaspi/winaspi16.c
View file @
383da68c
...
...
@@ -8,6 +8,7 @@
#include <memory.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include "winbase.h"
#include "aspi.h"
...
...
dlls/winmm/mcicda/mcicda.c
View file @
383da68c
...
...
@@ -8,6 +8,7 @@
*/
#include "config.h"
#include <stdio.h>
#include "windef.h"
#include "wingdi.h"
#include "winuser.h"
...
...
dlls/winmm/mciseq/mcimidi.c
View file @
383da68c
...
...
@@ -16,6 +16,7 @@
*/
#include <stdlib.h>
#include <stdio.h>
#include "windef.h"
#include "wingdi.h"
#include "winuser.h"
...
...
@@ -24,7 +25,7 @@
#include "heap.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
mcimidi
)
DEFAULT_DEBUG_CHANNEL
(
mcimidi
)
;
#define MIDI_NOTEOFF 0x80
#define MIDI_NOTEON 0x90
...
...
dlls/winmm/mmio.c
View file @
383da68c
...
...
@@ -19,7 +19,7 @@
#include "mmsystem.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
mmio
)
DEFAULT_DEBUG_CHANNEL
(
mmio
)
;
LPMMIOPROC16
MMIO_InstallIOProc
(
FOURCC
,
LPMMIOPROC16
,
DWORD
,
BOOL
);
...
...
@@ -1114,11 +1114,12 @@ LRESULT WINAPI mmioSendMessage(HMMIO16 hmmio, UINT16 uMessage,
{
LPMMIOINFO16
lpmminfo
;
LRESULT
result
;
const
char
*
msg
=
NULL
;
struct
IOProcList
*
pListNode
;
#ifdef DEBUG_RUNTIME
switch
(
uMessage
)
{
if
(
TRACE_ON
(
mmio
))
{
const
char
*
msg
=
NULL
;
switch
(
uMessage
)
{
#define msgname(x) case x: msg = #x; break;
msgname
(
MMIOM_OPEN
);
msgname
(
MMIOM_CLOSE
);
...
...
@@ -1128,15 +1129,14 @@ LRESULT WINAPI mmioSendMessage(HMMIO16 hmmio, UINT16 uMessage,
msgname
(
MMIOM_SEEK
);
msgname
(
MMIOM_RENAME
);
#undef msgname
}
#endif
if
(
msg
)
}
if
(
msg
)
TRACE
(
"(%04X, %s, %ld, %ld)
\n
"
,
hmmio
,
msg
,
lParam1
,
lParam2
);
else
hmmio
,
msg
,
lParam1
,
lParam2
);
else
TRACE
(
"(%04X, %u, %ld, %ld)
\n
"
,
hmmio
,
uMessage
,
lParam1
,
lParam2
);
hmmio
,
uMessage
,
lParam1
,
lParam2
);
}
lpmminfo
=
(
LPMMIOINFO16
)
GlobalLock16
(
hmmio
);
...
...
dlls/winmm/wineoss/mixer.c
View file @
383da68c
...
...
@@ -10,6 +10,7 @@
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
...
...
@@ -21,7 +22,7 @@
#include "oss.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
mmaux
)
DEFAULT_DEBUG_CHANNEL
(
mmaux
)
;
#ifdef HAVE_OSS
...
...
dlls/wnaspi32/winaspi32.c
View file @
383da68c
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
...
...
@@ -17,7 +18,7 @@
#include "ldt.h"
#include "callback.h"
DEFAULT_DEBUG_CHANNEL
(
aspi
)
DEFAULT_DEBUG_CHANNEL
(
aspi
)
;
/* FIXME!
* 1) Residual byte length reporting not handled
...
...
files/file.c
View file @
383da68c
...
...
@@ -16,6 +16,7 @@
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef HAVE_SYS_ERRNO_H
#include <sys/errno.h>
...
...
@@ -50,7 +51,7 @@
#include "server.h"
DEFAULT_DEBUG_CHANNEL
(
file
)
DEFAULT_DEBUG_CHANNEL
(
file
)
;
#if defined(MAP_ANONYMOUS) && !defined(MAP_ANON)
#define MAP_ANON MAP_ANONYMOUS
...
...
graphics/ddraw.c
View file @
383da68c
...
...
@@ -55,6 +55,7 @@
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "gdi.h"
#include "heap.h"
...
...
@@ -75,7 +76,7 @@ static char *ddProp = "WINE_DDRAW_Property";
#include "ddraw_private.h"
#include "d3d_private.h"
DEFAULT_DEBUG_CHANNEL
(
ddraw
)
DEFAULT_DEBUG_CHANNEL
(
ddraw
)
;
/* Restore signal handlers overwritten by XF86DGA
*/
...
...
graphics/psdrv/afm.c
View file @
383da68c
...
...
@@ -7,13 +7,14 @@
*/
#include <string.h>
#include <stdio.h>
#include "winnt.h"
/* HEAP_ZERO_MEMORY */
#include "psdrv.h"
#include "options.h"
#include "debugtools.h"
#include "heap.h"
DEFAULT_DEBUG_CHANNEL
(
psdrv
)
DEFAULT_DEBUG_CHANNEL
(
psdrv
)
;
#include <ctype.h>
/* ptr to fonts for which we have afm files */
...
...
graphics/psdrv/ppd.c
View file @
383da68c
...
...
@@ -6,6 +6,7 @@
*/
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include "winnt.h"
/* HEAP_ZERO_MEMORY */
#include "heap.h"
...
...
@@ -13,7 +14,7 @@
#include "psdrv.h"
#include "winspool.h"
DEFAULT_DEBUG_CHANNEL
(
psdrv
)
DEFAULT_DEBUG_CHANNEL
(
psdrv
)
;
typedef
struct
{
char
*
key
;
...
...
graphics/psdrv/ps.c
View file @
383da68c
...
...
@@ -6,12 +6,13 @@
*/
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include "psdrv.h"
#include "winspool.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
psdrv
)
DEFAULT_DEBUG_CHANNEL
(
psdrv
)
;
static
char
psheader
[]
=
/* title llx lly urx ury orientation */
"%%!PS-Adobe-3.0
\n
"
...
...
if1632/builtin.c
View file @
383da68c
...
...
@@ -7,6 +7,7 @@
#include <assert.h>
#include <ctype.h>
#include <string.h>
#include <stdio.h>
#include "winbase.h"
#include "wine/winbase16.h"
#include "wine/winestring.h"
...
...
include/debugdefs.h
View file @
383da68c
This diff is collapsed.
Click to expand it.
include/debugtools.h
View file @
383da68c
...
...
@@ -5,97 +5,91 @@
#ifdef __WINE__
/* Debugging interface is internal to Wine */
#include <stdarg.h>
#include <stdio.h>
#include "config.h"
#include "windef.h"
#define DEBUG_RUNTIME
struct
_GUID
;
/* Internal definitions (do not use these directly) */
enum
__DEBUG_CLASS
{
__DBCL_FIXME
,
__DBCL_ERR
,
__DBCL_WARN
,
__DBCL_TRACE
,
__DBCL_COUNT
};
extern
char
__debug_msg_enabled
[][
__DBCL_COUNT
];
#ifndef NO_TRACE_MSGS
# define __GET_DEBUGGING_trace(dbch) ((dbch)[0] & (1 << __DBCL_TRACE))
#else
# define __GET_DEBUGGING_trace(dbch) 0
#endif
extern
const
char
*
const
debug_cl_name
[
__DBCL_COUNT
];
extern
const
char
*
const
debug_ch_name
[];
#ifndef NO_DEBUG_MSGS
# define __GET_DEBUGGING_warn(dbch) ((dbch)[0] & (1 << __DBCL_WARN))
# define __GET_DEBUGGING_fixme(dbch) ((dbch)[0] & (1 << __DBCL_FIXME))
#else
# define __GET_DEBUGGING_warn(dbch) 0
# define __GET_DEBUGGING_fixme(dbch) 0
#endif
/* define error macro regardless of what is configured */
#define __GET_DEBUGGING_err(dbch) ((dbch)[0] & (1 << __DBCL_ERR))
#define __GET_DEBUGGING(dbcl,dbch) (__debug_msg_enabled[(dbch)][(dbcl)])
#define __SET_DEBUGGING(dbcl,dbch,on) (__debug_msg_enabled[(dbch)][(dbcl)] = (on))
#define __GET_DEBUGGING(dbcl,dbch) __GET_DEBUGGING_##dbcl(dbch)
#define __SET_DEBUGGING(dbcl,dbch,on) \
((on) ? ((dbch)[0] |= 1 << (dbcl)) : ((dbch)[0] &= ~(1 << (dbcl))))
#ifndef __GNUC__
#define __FUNCTION__ ""
#endif
#define __DPRINTF(dbcl,dbch) \
(!__GET_DEBUGGING(dbcl,dbch) || \
(dbg_printf("%s:%s:%s ", debug_cl_name[(dbcl)], debug_ch_name[(dbch)], __FUNCTION__),0)) \
? 0 : dbg_printf
#define __DUMMY_DPRINTF 1 ? (void)0 : (void)((int (*)(char *, ...)) NULL)
(!__GET_DEBUGGING(dbcl,(dbch)) || (dbg_header_##dbcl((dbch),__FUNCTION__),0)) ? \
(void)0 : (void)dbg_printf
/* Exported definitions and macros */
/* These function return a printable version of a string, including
quotes. The string will be valid for some time, but not indefinitely
as strings are re-used. */
extern
LPSTR
debugstr_an
(
LPCSTR
s
,
int
n
);
extern
LPSTR
debugstr_a
(
LPCSTR
s
);
extern
LPSTR
debugstr_wn
(
LPCWSTR
s
,
int
n
);
extern
LPSTR
debugstr_w
(
LPCWSTR
s
);
extern
LPSTR
debugres_a
(
LPCSTR
res
);
extern
LPSTR
debugres_w
(
LPCWSTR
res
);
extern
LPSTR
debugstr_guid
(
const
struct
_GUID
*
id
);
extern
LPSTR
debugstr_hex_dump
(
const
void
*
ptr
,
int
len
);
extern
LPCSTR
debugstr_an
(
LPCSTR
s
,
int
n
);
extern
LPCSTR
debugstr_wn
(
LPCWSTR
s
,
int
n
);
extern
LPCSTR
debugres_a
(
LPCSTR
res
);
extern
LPCSTR
debugres_w
(
LPCWSTR
res
);
extern
LPCSTR
debugstr_guid
(
const
struct
_GUID
*
id
);
extern
LPCSTR
debugstr_hex_dump
(
const
void
*
ptr
,
int
len
);
extern
int
dbg_header_err
(
const
char
*
dbg_channel
,
const
char
*
func
);
extern
int
dbg_header_warn
(
const
char
*
dbg_channel
,
const
char
*
func
);
extern
int
dbg_header_fixme
(
const
char
*
dbg_channel
,
const
char
*
func
);
extern
int
dbg_header_trace
(
const
char
*
dbg_channel
,
const
char
*
func
);
extern
int
dbg_vprintf
(
const
char
*
format
,
va_list
args
);
static
inline
LPCSTR
debugstr_a
(
LPCSTR
s
)
{
return
debugstr_an
(
s
,
80
);
}
static
inline
LPCSTR
debugstr_w
(
LPCWSTR
s
)
{
return
debugstr_wn
(
s
,
80
);
}
#ifdef __GNUC__
extern
int
dbg_printf
(
const
char
*
format
,
...)
__attribute__
((
format
(
printf
,
1
,
2
)));
#else
extern
int
dbg_printf
(
const
char
*
format
,
...);
#endif
/* use configure to allow user to compile out debugging messages */
#ifndef NO_TRACE_MSGS
#define TRACE __DPRINTF(__DBCL_TRACE,*DBCH_DEFAULT)
#define TRACE_(ch) __DPRINTF(__DBCL_TRACE,dbch_##ch)
#define TRACE_ON(ch) __GET_DEBUGGING(__DBCL_TRACE,dbch_##ch)
#else
#define TRACE __DUMMY_DPRINTF
#define TRACE_(ch) __DUMMY_DPRINTF
#define TRACE_ON(ch) 0
#endif
/* NO_TRACE_MSGS */
#define TRACE __DPRINTF(trace,__dbch_default)
#define TRACE_(ch) __DPRINTF(trace,dbch_##ch)
#define TRACE_ON(ch) __GET_DEBUGGING(trace,dbch_##ch)
#ifndef NO_DEBUG_MSGS
#define WARN __DPRINTF(__DBCL_WARN,*DBCH_DEFAULT)
#define WARN_(ch) __DPRINTF(__DBCL_WARN,dbch_##ch)
#define WARN_ON(ch) __GET_DEBUGGING(__DBCL_WARN,dbch_##ch)
#define FIXME __DPRINTF(__DBCL_FIXME,*DBCH_DEFAULT)
#define FIXME_(ch) __DPRINTF(__DBCL_FIXME,dbch_##ch)
#define FIXME_ON(ch) __GET_DEBUGGING(__DBCL_FIXME,dbch_##ch)
#else
#define WARN __DUMMY_DPRINTF
#define WARN_(ch) __DUMMY_DPRINTF
#define WARN_ON(ch) 0
#define FIXME __DUMMY_DPRINTF
#define FIXME_(ch) __DUMMY_DPRINTF
#define FIXME_ON(ch) 0
#endif
/* NO_DEBUG_MSGS */
#define WARN __DPRINTF(warn,__dbch_default)
#define WARN_(ch) __DPRINTF(warn,dbch_##ch)
#define WARN_ON(ch) __GET_DEBUGGING(warn,dbch_##ch)
/* define error macro regardless of what is configured */
/* Solaris got an 'ERR' define in <sys/reg.h> */
#undef ERR
#define ERR __DPRINTF(__DBCL_ERR,*DBCH_DEFAULT)
#define ERR_(ch) __DPRINTF(__DBCL_ERR,dbch_##ch)
#define ERR_ON(ch) __GET_DEBUGGING(__DBCL_ERR,dbch_##ch)
#define FIXME __DPRINTF(fixme,__dbch_default)
#define FIXME_(ch) __DPRINTF(fixme,dbch_##ch)
#define FIXME_ON(ch) __GET_DEBUGGING(fixme,dbch_##ch)
#undef ERR
/* Solaris got an 'ERR' define in <sys/reg.h> */
#define ERR __DPRINTF(err,__dbch_default)
#define ERR_(ch) __DPRINTF(err,dbch_##ch)
#define ERR_ON(ch) __GET_DEBUGGING(err,dbch_##ch)
#define DECLARE_DEBUG_CHANNEL(ch) \
extern c
onst int dbch_##ch
;
extern c
har dbch_##ch[]
;
#define DEFAULT_DEBUG_CHANNEL(ch) \
extern c
onst int dbch_##ch; static const int *const DBCH_DEFAULT = &
dbch_##ch;
extern c
har dbch_##ch[]; static char * const __dbch_default =
dbch_##ch;
#define DPRINTF dbg_printf
#define MESSAGE dbg_printf
...
...
include/miscemu.h
View file @
383da68c
...
...
@@ -218,7 +218,7 @@ extern void ASPI_DOS_HandleInt(CONTEXT86 *context);
(!seg || IS_SELECTOR_SYSTEM(seg))? (void *)off : PTR_SEG_OFF_TO_LIN(seg,off&0xffff))
#define INT_BARF(context,num) \
fprintf( stderr,
"int%x: unknown/not implemented parameters:\n" \
ERR(
"int%x: unknown/not implemented parameters:\n" \
"int%x: AX %04x, BX %04x, CX %04x, DX %04x, " \
"SI %04x, DI %04x, DS %04x, ES %04x\n", \
(num), (num), AX_reg(context), BX_reg(context), CX_reg(context), \
...
...
memory/global.c
View file @
383da68c
...
...
@@ -7,6 +7,7 @@
#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
...
...
@@ -21,7 +22,7 @@
#include "debugtools.h"
#include "winerror.h"
DEFAULT_DEBUG_CHANNEL
(
global
)
DEFAULT_DEBUG_CHANNEL
(
global
)
;
/* Global arena block */
typedef
struct
...
...
memory/heap.c
View file @
383da68c
...
...
@@ -7,6 +7,7 @@
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "wine/winbase16.h"
#include "wine/winestring.h"
...
...
@@ -19,7 +20,7 @@
#include "toolhelp.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
heap
)
DEFAULT_DEBUG_CHANNEL
(
heap
)
;
/* Note: the heap data structures are based on what Pietrek describes in his
* book 'Windows 95 System Programming Secrets'. The layout is not exactly
...
...
memory/ldt.c
View file @
383da68c
...
...
@@ -8,12 +8,13 @@
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include "ldt.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
ldt
)
DEFAULT_DEBUG_CHANNEL
(
ldt
)
;
#ifdef __i386__
...
...
memory/virtual.c
View file @
383da68c
...
...
@@ -14,6 +14,7 @@
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#ifdef HAVE_SYS_MMAN_H
...
...
@@ -28,7 +29,7 @@
#include "server.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
virtual
)
DEFAULT_DEBUG_CHANNEL
(
virtual
)
;
#ifndef MS_SYNC
#define MS_SYNC 0
...
...
misc/cpu.c
View file @
383da68c
...
...
@@ -7,6 +7,7 @@
#include <ctype.h>
#include <string.h>
#include <stdio.h>
#include "winbase.h"
#include "wine/winbase16.h"
#include "wine/winestring.h"
...
...
@@ -16,7 +17,7 @@
#include "winerror.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
reg
)
DEFAULT_DEBUG_CHANNEL
(
reg
)
;
static
BYTE
PF
[
64
]
=
{
0
,};
...
...
misc/debugstr.c
View file @
383da68c
...
...
@@ -52,8 +52,7 @@ gimme1 (int n)
/* ---------------------------------------------------------------------- */
LPSTR
debugstr_an
(
LPCSTR
src
,
int
n
)
LPCSTR
debugstr_an
(
LPCSTR
src
,
int
n
)
{
LPSTR
dst
,
res
;
...
...
@@ -96,16 +95,7 @@ debugstr_an (LPCSTR src, int n)
/* ---------------------------------------------------------------------- */
LPSTR
debugstr_a
(
LPCSTR
s
)
{
return
debugstr_an
(
s
,
80
);
}
/* ---------------------------------------------------------------------- */
LPSTR
debugstr_wn
(
LPCWSTR
src
,
int
n
)
LPCSTR
debugstr_wn
(
LPCWSTR
src
,
int
n
)
{
LPSTR
dst
,
res
;
...
...
@@ -147,36 +137,30 @@ debugstr_wn (LPCWSTR src, int n)
}
/* ---------------------------------------------------------------------- */
LPSTR
debugstr_w
(
LPCWSTR
s
)
{
return
debugstr_wn
(
s
,
80
);
}
/* ---------------------------------------------------------------------- */
/* This routine returns a nicely formated name of the resource res
If the resource name is a string, it will return '<res-name>'
If it is a number, it will return #<4-digit-hex-number> */
LPSTR
debugres_a
(
LPCSTR
res
)
LP
C
STR
debugres_a
(
LPCSTR
res
)
{
char
resname
[
10
]
;
char
*
resname
;
if
(
HIWORD
(
res
))
return
debugstr_a
(
res
);
sprintf
(
resname
,
"#%04x"
,
LOWORD
(
res
));
return
debugstr_a
(
resname
);
resname
=
gimme1
(
6
);
sprintf
(
resname
,
"#%04x"
,
LOWORD
(
res
)
);
return
resname
;
}
LPSTR
debugres_w
(
LPCWSTR
res
)
LP
C
STR
debugres_w
(
LPCWSTR
res
)
{
char
resname
[
10
]
;
char
*
resname
;
if
(
HIWORD
(
res
))
return
debugstr_w
(
res
);
sprintf
(
resname
,
"#%04x"
,
LOWORD
(
res
));
return
debugstr_a
(
resname
);
resname
=
gimme1
(
6
);
sprintf
(
resname
,
"#%04x"
,
LOWORD
(
res
)
);
return
resname
;
}
/* ---------------------------------------------------------------------- */
LPSTR
debugstr_guid
(
const
GUID
*
id
)
LP
C
STR
debugstr_guid
(
const
GUID
*
id
)
{
LPSTR
str
;
...
...
@@ -232,7 +216,6 @@ int dbg_printf(const char *format, ...)
}
/*--< Function >---------------------------------------------------------
**
** debugstr_hex_dump
...
...
@@ -252,8 +235,7 @@ int dbg_printf(const char *format, ...)
** TRACE("struct dump is \n%s", debugstr_hex_dump(&x, sizeof(x)));
**
**-------------------------------------------------------------------------*/
LPSTR
debugstr_hex_dump
(
const
void
*
ptr
,
int
len
)
LPCSTR
debugstr_hex_dump
(
const
void
*
ptr
,
int
len
)
{
/* Locals */
char
dumpbuf
[
59
];
...
...
misc/error.c
View file @
383da68c
...
...
@@ -5,6 +5,7 @@
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "windef.h"
...
...
misc/main.c
View file @
383da68c
...
...
@@ -104,6 +104,7 @@ struct options Options =
FALSE
,
/* Perfect graphics */
FALSE
,
/* No DGA */
FALSE
,
/* No XSHM */
FALSE
,
/* DXGrab */
NULL
,
/* Alternate config file name */
0
/* screenDepth */
};
...
...
@@ -194,7 +195,7 @@ BOOL MAIN_ParseDebugOptions(char *options)
int
l
,
cls
,
dotracerelay
=
TRACE_ON
(
relay
);
l
=
strlen
(
options
);
if
(
l
<
3
)
if
(
l
<
2
)
return
FALSE
;
if
(
options
[
l
-
1
]
==
'\n'
)
options
[
l
-
1
]
=
'\0'
;
do
...
...
@@ -226,7 +227,7 @@ BOOL MAIN_ParseDebugOptions(char *options)
for
(
i
=
0
;
i
<
DEBUG_CHANNEL_COUNT
;
i
++
)
for
(
j
=
0
;
j
<
DEBUG_CLASS_COUNT
;
j
++
)
if
(
cls
==
-
1
||
cls
==
j
)
__SET_DEBUGGING
(
j
,
i
,
(
*
options
==
'+'
)
);
__SET_DEBUGGING
(
j
,
debug_channels
[
i
]
,
(
*
options
==
'+'
)
);
}
else
if
(
!
lstrncmpiA
(
options
+
1
,
"relay="
,
6
)
||
!
lstrncmpiA
(
options
+
1
,
"snoop="
,
6
))
...
...
@@ -235,10 +236,11 @@ BOOL MAIN_ParseDebugOptions(char *options)
char
*
s
,
*
s2
,
***
output
,
c
;
for
(
i
=
0
;
i
<
DEBUG_CHANNEL_COUNT
;
i
++
)
if
(
debug_ch_name
&&
(
!
lstrncmpiA
(
debug_ch_name
[
i
],
options
+
1
,
5
))){
if
(
!
strncasecmp
(
debug_channels
[
i
]
+
1
,
options
+
1
,
5
))
{
for
(
j
=
0
;
j
<
DEBUG_CLASS_COUNT
;
j
++
)
if
(
cls
==
-
1
||
cls
==
j
)
__SET_DEBUGGING
(
j
,
i
,
1
);
__SET_DEBUGGING
(
j
,
debug_channels
[
i
]
,
1
);
break
;
}
/* should never happen, maybe assert(i!=DEBUG_CHANNEL_COUNT)? */
...
...
@@ -277,10 +279,11 @@ BOOL MAIN_ParseDebugOptions(char *options)
{
int
i
,
j
;
for
(
i
=
0
;
i
<
DEBUG_CHANNEL_COUNT
;
i
++
)
if
(
debug_ch_name
&&
(
!
lstrncmpiA
(
options
+
1
,
debug_ch_name
[
i
],
l
-
1
))){
if
(
!
strncasecmp
(
debug_channels
[
i
]
+
1
,
options
+
1
,
l
-
1
)
&&
!
debug_channels
[
i
][
l
])
{
for
(
j
=
0
;
j
<
DEBUG_CLASS_COUNT
;
j
++
)
if
(
cls
==
-
1
||
cls
==
j
)
__SET_DEBUGGING
(
j
,
i
,
(
*
options
==
'+'
)
);
__SET_DEBUGGING
(
j
,
debug_channels
[
i
]
,
(
*
options
==
'+'
)
);
break
;
}
if
(
i
==
DEBUG_CHANNEL_COUNT
)
...
...
@@ -316,8 +319,7 @@ BOOL MAIN_ParseDebugOptions(char *options)
MESSAGE
(
"Available message types:
\n
"
);
MESSAGE
(
"%-9s "
,
"all"
);
for
(
i
=
0
;
i
<
DEBUG_CHANNEL_COUNT
;
i
++
)
if
(
debug_ch_name
[
i
])
MESSAGE
(
"%-9s%c"
,
debug_ch_name
[
i
],
MESSAGE
(
"%-9s%c"
,
debug_channels
[
i
]
+
1
,
(((
i
+
2
)
%
8
==
0
)
?
'\n'
:
' '
));
MESSAGE
(
"
\n\n
"
);
ExitProcess
(
1
);
...
...
misc/registry.c
View file @
383da68c
...
...
@@ -23,6 +23,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <ctype.h>
#include <errno.h>
...
...
@@ -49,7 +50,7 @@
#include "server.h"
#include "services.h"
DEFAULT_DEBUG_CHANNEL
(
reg
)
DEFAULT_DEBUG_CHANNEL
(
reg
)
;
static
void
REGISTRY_Init
(
void
);
/* FIXME: following defines should be configured global ... */
...
...
msdos/dpmi.c
View file @
383da68c
...
...
@@ -22,7 +22,7 @@
#include "callback.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
int31
)
DEFAULT_DEBUG_CHANNEL
(
int31
)
;
#define DOS_GET_DRIVE(reg) ((reg) ? (reg) - 1 : DRIVE_GetCurrentDrive())
...
...
msdos/int2a.c
View file @
383da68c
...
...
@@ -7,6 +7,8 @@
#include "miscemu.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
int
);
/**********************************************************************
* INT_Int2aHandler
*
...
...
msdos/int3d.c
View file @
383da68c
...
...
@@ -6,9 +6,10 @@
#include <stdlib.h>
#include "msdos.h"
#include "miscemu.h"
/* #define DEBUG_INT */
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
int
);
/**********************************************************************
* INT_Int3dHandler
*
...
...
msdos/int41.c
View file @
383da68c
...
...
@@ -6,6 +6,9 @@
#include <stdio.h>
#include "miscemu.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
int
);
/***********************************************************************
* INT_Int41Handler
...
...
msdos/int4b.c
View file @
383da68c
...
...
@@ -4,6 +4,9 @@
#include <stdio.h>
#include "miscemu.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
int
);
/***********************************************************************
* INT_Int4bHandler
...
...
msdos/ioports.c
View file @
383da68c
...
...
@@ -13,6 +13,7 @@
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
...
...
relay32/snoop.c
View file @
383da68c
...
...
@@ -7,6 +7,7 @@
#include "config.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include "winbase.h"
#include "winnt.h"
...
...
tools/make_debug
View file @
383da68c
...
...
@@ -21,16 +21,14 @@ cat <<EOF
#define DEBUG_CLASS_COUNT __DBCL_COUNT
#ifdef DEBUG_RUNTIME
const char * const debug_cl_name[] = { "fixme", "err", "warn", "trace" };
static const char * const debug_cl_name[] = { "fixme", "err", "warn", "trace" };
EOF
chno
=
0
for
ch
in
$DEBUG_CHANNELS
do
echo
"c
onst int dbch_
$ch
=
$chno
;"
echo
"c
har dbch_
$ch
[] =
\"\\
003
$ch
\"
;"
chno
=
`
expr
$chno
+ 1
`
done
echo
...
...
@@ -38,35 +36,25 @@ echo "#define DEBUG_CHANNEL_COUNT $chno"
count
=
1
echo
echo
'
char __debug_msg_enabled[DEBUG_CHANNEL_COUNT][DEBUG_CLASS
_COUNT] = {'
echo
'
static char * const debug_channels[DEBUG_CHANNEL
_COUNT] = {'
for
ch
in
$DEBUG_CHANNELS
do
if
[
"
${
count
}
"
!=
"
${
chno
}
"
]
;
then
echo
"
{1, 1, 0, 0
},"
echo
"
dbch_
${
ch
}
,"
else
echo
"
{1, 1, 0, 0
}"
echo
"
dbch_
${
ch
}
"
fi
count
=
`
expr
$count
+ 1
`
done
echo
'};'
count
=
1
echo
echo
'const char * const debug_ch_name[DEBUG_CHANNEL_COUNT] = {'
for
ch
in
$DEBUG_CHANNELS
for
cls
in
err fixme warn trace
do
if
[
"
${
count
}
"
!=
"
${
chno
}
"
]
;
then
echo
"
\"
${
ch
}
\"
,"
;
else
echo
"
\"
${
ch
}
\"
"
;
fi
count
=
`
expr
$count
+ 1
`
done
echo
'};'
cat
<<
EOF
cat
<<
EOF
#endif /*DEBUG_RUNTIME*/
/* end of automatically generated debug.h */
int dbg_header_
$cls
( const char *dbg_channel, const char *func )
{
return dbg_printf( "
$cls
:%s:%s ", dbg_channel + 1, func );
}
EOF
done
win32/kernel32.c
View file @
383da68c
...
...
@@ -7,6 +7,8 @@
*/
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include "windef.h"
#include "winbase.h"
...
...
@@ -26,9 +28,8 @@
#include "syslevel.h"
#include "winerror.h"
DECLARE_DEBUG_CHANNEL
(
thunk
)
DECLARE_DEBUG_CHANNEL
(
dosmem
)
DECLARE_DEBUG_CHANNEL
(
win32
)
DEFAULT_DEBUG_CHANNEL
(
thunk
);
DECLARE_DEBUG_CHANNEL
(
win32
);
/***********************************************************************
...
...
@@ -42,7 +43,7 @@ DECLARE_DEBUG_CHANNEL(win32)
*/
void
WINAPI
LogApiThk
(
LPSTR
func
)
{
TRACE
_
(
thunk
)
(
"%s
\n
"
,
debugstr_a
(
func
)
);
TRACE
(
"%s
\n
"
,
debugstr_a
(
func
)
);
}
/***********************************************************************
...
...
@@ -52,7 +53,7 @@ void WINAPI LogApiThk( LPSTR func )
*/
void
WINAPI
LogApiThkLSF
(
LPSTR
func
,
CONTEXT86
*
context
)
{
TRACE
_
(
thunk
)
(
"%s
\n
"
,
debugstr_a
(
func
)
);
TRACE
(
"%s
\n
"
,
debugstr_a
(
func
)
);
}
/***********************************************************************
...
...
@@ -62,7 +63,7 @@ void WINAPI LogApiThkLSF( LPSTR func, CONTEXT86 *context )
*/
void
WINAPI
LogApiThkSL
(
LPSTR
func
,
CONTEXT86
*
context
)
{
TRACE
_
(
thunk
)
(
"%s
\n
"
,
debugstr_a
(
func
)
);
TRACE
(
"%s
\n
"
,
debugstr_a
(
func
)
);
}
/***********************************************************************
...
...
@@ -72,7 +73,7 @@ void WINAPI LogApiThkSL( LPSTR func, CONTEXT86 *context )
*/
void
WINAPI
LogCBThkSL
(
LPSTR
func
,
CONTEXT86
*
context
)
{
TRACE
_
(
thunk
)
(
"%s
\n
"
,
debugstr_a
(
func
)
);
TRACE
(
"%s
\n
"
,
debugstr_a
(
func
)
);
}
/***********************************************************************
...
...
@@ -135,7 +136,7 @@ static LPVOID _loadthunk(LPCSTR module, LPCSTR func, LPCSTR module32,
if
((
hmod
=
LoadLibrary16
(
module
))
<=
32
)
{
ERR
_
(
thunk
)
(
"(%s, %s, %s): Unable to load '%s', error %d
\n
"
,
ERR
(
"(%s, %s, %s): Unable to load '%s', error %d
\n
"
,
module
,
func
,
module32
,
module
,
hmod
);
return
0
;
}
...
...
@@ -143,14 +144,14 @@ static LPVOID _loadthunk(LPCSTR module, LPCSTR func, LPCSTR module32,
if
(
!
(
ordinal
=
NE_GetOrdinal
(
hmod
,
func
))
||
!
(
TD16
=
PTR_SEG_TO_LIN
(
NE_GetEntryPointEx
(
hmod
,
ordinal
,
FALSE
))))
{
ERR
_
(
thunk
)
(
"(%s, %s, %s): Unable to find '%s'
\n
"
,
ERR
(
"(%s, %s, %s): Unable to find '%s'
\n
"
,
module
,
func
,
module32
,
func
);
return
0
;
}
if
(
TD32
&&
memcmp
(
TD16
->
magic
,
TD32
->
magic
,
4
))
{
ERR
_
(
thunk
)
(
"(%s, %s, %s): Bad magic %c%c%c%c (should be %c%c%c%c)
\n
"
,
ERR
(
"(%s, %s, %s): Bad magic %c%c%c%c (should be %c%c%c%c)
\n
"
,
module
,
func
,
module32
,
TD16
->
magic
[
0
],
TD16
->
magic
[
1
],
TD16
->
magic
[
2
],
TD16
->
magic
[
3
],
TD32
->
magic
[
0
],
TD32
->
magic
[
1
],
TD32
->
magic
[
2
],
TD32
->
magic
[
3
]);
...
...
@@ -159,14 +160,14 @@ static LPVOID _loadthunk(LPCSTR module, LPCSTR func, LPCSTR module32,
if
(
TD32
&&
TD16
->
checksum
!=
TD32
->
checksum
)
{
ERR
_
(
thunk
)
(
"(%s, %s, %s): Wrong checksum %08lx (should be %08lx)
\n
"
,
ERR
(
"(%s, %s, %s): Wrong checksum %08lx (should be %08lx)
\n
"
,
module
,
func
,
module32
,
TD16
->
checksum
,
TD32
->
checksum
);
return
0
;
}
if
(
!
TD32
&&
checksum
&&
checksum
!=
*
(
LPDWORD
)
TD16
)
{
ERR
_
(
thunk
)
(
"(%s, %s, %s): Wrong checksum %08lx (should be %08lx)
\n
"
,
ERR
(
"(%s, %s, %s): Wrong checksum %08lx (should be %08lx)
\n
"
,
module
,
func
,
module32
,
*
(
LPDWORD
)
TD16
,
checksum
);
return
0
;
}
...
...
@@ -209,19 +210,19 @@ UINT WINAPI ThunkConnect32(
{
directionSL
=
TRUE
;
TRACE
_
(
thunk
)
(
"SL01 thunk %s (%lx) <- %s (%s), Reason: %ld
\n
"
,
TRACE
(
"SL01 thunk %s (%lx) <- %s (%s), Reason: %ld
\n
"
,
module32
,
(
DWORD
)
TD
,
module16
,
thunkfun16
,
dwReason
);
}
else
if
(
!
strncmp
(
TD
->
magic
,
"LS01"
,
4
))
{
directionSL
=
FALSE
;
TRACE
_
(
thunk
)
(
"LS01 thunk %s (%lx) -> %s (%s), Reason: %ld
\n
"
,
TRACE
(
"LS01 thunk %s (%lx) -> %s (%s), Reason: %ld
\n
"
,
module32
,
(
DWORD
)
TD
,
module16
,
thunkfun16
,
dwReason
);
}
else
{
ERR
_
(
thunk
)
(
"Invalid magic %c%c%c%c
\n
"
,
ERR
(
"Invalid magic %c%c%c%c
\n
"
,
TD
->
magic
[
0
],
TD
->
magic
[
1
],
TD
->
magic
[
2
],
TD
->
magic
[
3
]);
return
0
;
}
...
...
@@ -242,7 +243,7 @@ UINT WINAPI ThunkConnect32(
if
(
SL16
->
fpData
==
NULL
)
{
ERR
_
(
thunk
)
(
"ThunkConnect16 was not called!
\n
"
);
ERR
(
"ThunkConnect16 was not called!
\n
"
);
return
0
;
}
...
...
@@ -255,7 +256,7 @@ UINT WINAPI ThunkConnect32(
tdb
->
next
=
SL32
->
data
->
targetDB
;
/* FIXME: not thread-safe! */
SL32
->
data
->
targetDB
=
tdb
;
TRACE
_
(
thunk
)
(
"Process %08lx allocated TargetDB entry for ThunkDataSL %08lx
\n
"
,
TRACE
(
"Process %08lx allocated TargetDB entry for ThunkDataSL %08lx
\n
"
,
(
DWORD
)
PROCESS_Current
(),
(
DWORD
)
SL32
->
data
);
}
else
...
...
@@ -806,7 +807,7 @@ BOOL WINAPI SSInit16()
*/
BOOL
WINAPI
SSOnBigStack
()
{
TRACE
_
(
thunk
)
(
"Yes, thunking is initialized
\n
"
);
TRACE
(
"Yes, thunking is initialized
\n
"
);
return
TRUE
;
}
...
...
@@ -874,12 +875,12 @@ DWORD WINAPIV SSCall(
case
48
:
ret
=
fun
(
args
[
0
],
args
[
1
],
args
[
2
],
args
[
3
],
args
[
4
],
args
[
5
],
args
[
6
],
args
[
7
],
args
[
8
],
args
[
9
],
args
[
10
],
args
[
11
]);
break
;
default:
WARN
_
(
thunk
)
(
"Unsupported nr of arguments, %ld
\n
"
,
nr
);
WARN
(
"Unsupported nr of arguments, %ld
\n
"
,
nr
);
ret
=
0
;
break
;
}
TRACE
_
(
thunk
)
(
" returning %ld ...
\n
"
,
ret
);
TRACE
(
" returning %ld ...
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -998,7 +999,7 @@ BOOL16 WINAPI IsPeFormat16(
return
FALSE
;
}
if
(
mzh
.
e_magic
!=
IMAGE_DOS_SIGNATURE
)
{
WARN
_
(
dosmem
)
(
"File has not got dos signature!
\n
"
);
WARN
(
"File has not got dos signature!
\n
"
);
_lclose
(
hf
);
return
FALSE
;
}
...
...
@@ -1051,7 +1052,7 @@ void WINAPI K32Thk1632Prolog( CONTEXT86 *context )
char
*
stack32
=
(
char
*
)
NtCurrentTeb
()
->
cur_stack
-
argSize
;
STACK16FRAME
*
frame16
=
(
STACK16FRAME
*
)
stack16
-
1
;
TRACE
_
(
thunk
)
(
"before SYSTHUNK hack: EBP: %08lx ESP: %08lx cur_stack: %08lx
\n
"
,
TRACE
(
"before SYSTHUNK hack: EBP: %08lx ESP: %08lx cur_stack: %08lx
\n
"
,
EBP_reg
(
context
),
ESP_reg
(
context
),
NtCurrentTeb
()
->
cur_stack
);
memset
(
frame16
,
'\0'
,
sizeof
(
STACK16FRAME
));
...
...
@@ -1064,7 +1065,7 @@ void WINAPI K32Thk1632Prolog( CONTEXT86 *context )
ESP_reg
(
context
)
=
(
DWORD
)
stack32
+
4
;
EBP_reg
(
context
)
=
ESP_reg
(
context
)
+
argSize
;
TRACE
_
(
thunk
)
(
"after SYSTHUNK hack: EBP: %08lx ESP: %08lx cur_stack: %08lx
\n
"
,
TRACE
(
"after SYSTHUNK hack: EBP: %08lx ESP: %08lx cur_stack: %08lx
\n
"
,
EBP_reg
(
context
),
ESP_reg
(
context
),
NtCurrentTeb
()
->
cur_stack
);
}
...
...
@@ -1092,7 +1093,7 @@ void WINAPI K32Thk1632Epilog( CONTEXT86 *context )
DWORD
nArgsPopped
=
ESP_reg
(
context
)
-
(
DWORD
)
stack32
;
TRACE
_
(
thunk
)
(
"before SYSTHUNK hack: EBP: %08lx ESP: %08lx cur_stack: %08lx
\n
"
,
TRACE
(
"before SYSTHUNK hack: EBP: %08lx ESP: %08lx cur_stack: %08lx
\n
"
,
EBP_reg
(
context
),
ESP_reg
(
context
),
NtCurrentTeb
()
->
cur_stack
);
NtCurrentTeb
()
->
cur_stack
=
(
DWORD
)
frame16
->
frame32
;
...
...
@@ -1100,7 +1101,7 @@ void WINAPI K32Thk1632Epilog( CONTEXT86 *context )
ESP_reg
(
context
)
=
(
DWORD
)
stack16
+
nArgsPopped
;
EBP_reg
(
context
)
=
frame16
->
ebp
;
TRACE
_
(
thunk
)
(
"after SYSTHUNK hack: EBP: %08lx ESP: %08lx cur_stack: %08lx
\n
"
,
TRACE
(
"after SYSTHUNK hack: EBP: %08lx ESP: %08lx cur_stack: %08lx
\n
"
,
EBP_reg
(
context
),
ESP_reg
(
context
),
NtCurrentTeb
()
->
cur_stack
);
}
}
...
...
windows/x11drv/event.c
View file @
383da68c
...
...
@@ -43,8 +43,8 @@
#include "windef.h"
#include "x11drv.h"
DEFAULT_DEBUG_CHANNEL
(
event
)
DECLARE_DEBUG_CHANNEL
(
win
)
DEFAULT_DEBUG_CHANNEL
(
event
)
;
DECLARE_DEBUG_CHANNEL
(
win
)
;
/* X context to associate a hwnd to an X window */
extern
XContext
winContext
;
...
...
@@ -1005,20 +1005,19 @@ static Atom EVENT_SelectionRequest_TARGETS( Window requestor, Atom target, Atom
}
}
#ifdef DEBUG_RUNTIME
{
int
i
;
for
(
i
=
0
;
i
<
cTargets
;
i
++
)
if
(
TRACE_ON
(
event
))
{
if
(
targets
[
i
])
int
i
;
for
(
i
=
0
;
i
<
cTargets
;
i
++
)
{
char
*
itemFmtName
=
TSXGetAtomName
(
display
,
targets
[
i
]);
TRACE
(
"
\t
Atom# %d: Type %s
\n
"
,
i
,
itemFmtName
);
TSXFree
(
itemFmtName
);
if
(
targets
[
i
])
{
char
*
itemFmtName
=
TSXGetAtomName
(
display
,
targets
[
i
]);
TRACE
(
"
\t
Atom# %d: Type %s
\n
"
,
i
,
itemFmtName
);
TSXFree
(
itemFmtName
);
}
}
}
}
#endif
/* Update the X property */
TRACE
(
"
\t
Updating property %s..."
,
TSXGetAtomName
(
display
,
rprop
));
...
...
windows/x11drv/main.c
View file @
383da68c
...
...
@@ -258,16 +258,7 @@ void X11DRV_USER_ParseOptions(int *argc, char *argv[])
if
(
X11DRV_USER_GetResource
(
db
,
".debugoptions"
,
&
value
))
MAIN_ParseDebugOptions
((
char
*
)
value
.
addr
);
if
(
X11DRV_USER_GetResource
(
db
,
".debugmsg"
,
&
value
))
{
#ifndef DEBUG_RUNTIME
MESSAGE
(
"%s: Option
\"
-debugmsg
\"
not implemented.
\n
"
\
" Recompile with DEBUG_RUNTIME in include/debugtools.h defined.
\n
"
,
argv
[
0
]);
exit
(
1
);
#else
MAIN_ParseDebugOptions
((
char
*
)
value
.
addr
);
#endif
}
MAIN_ParseDebugOptions
((
char
*
)
value
.
addr
);
if
(
X11DRV_USER_GetResource
(
db
,
".dll"
,
&
value
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment