Commit d5042c44 authored by François Gouget's avatar François Gouget Committed by Alexandre Julliard

Compile the debugger with STRICT on.

parent 8ed43e6b
EXTRADEFS = -DSTRICT
TOPSRCDIR = @top_srcdir@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = .. TOPOBJDIR = ..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
......
...@@ -225,7 +225,7 @@ walk_command: ...@@ -225,7 +225,7 @@ walk_command:
| tWALK tMODULE tEOL { DEBUG_WalkModules(); } | tWALK tMODULE tEOL { DEBUG_WalkModules(); }
| tWALK tQUEUE tEOL { DEBUG_WalkQueues(); } | tWALK tQUEUE tEOL { DEBUG_WalkQueues(); }
| tWALK tWND tEOL { DEBUG_WalkWindows( 0, 0 ); } | tWALK tWND tEOL { DEBUG_WalkWindows( 0, 0 ); }
| tWALK tWND tNUM tEOL { DEBUG_WalkWindows( $3, 0 ); } | tWALK tWND tNUM tEOL { DEBUG_WalkWindows( (HWND)$3, 0 ); }
| tWALK tPROCESS tEOL { DEBUG_WalkProcess(); } | tWALK tPROCESS tEOL { DEBUG_WalkProcess(); }
| tWALK tTHREAD tEOL { DEBUG_WalkThreads(); } | tWALK tTHREAD tEOL { DEBUG_WalkThreads(); }
| tWALK tMODREF expr_value tEOL { DEBUG_WalkModref( $3 ); DEBUG_FreeExprMem(); } | tWALK tMODREF expr_value tEOL { DEBUG_WalkModref( $3 ); DEBUG_FreeExprMem(); }
......
...@@ -249,7 +249,7 @@ void DEBUG_InfoClass(const char* name) ...@@ -249,7 +249,7 @@ void DEBUG_InfoClass(const char* name)
DEBUG_Printf(DBG_CHN_MESG, "Class '%s':\n", name); DEBUG_Printf(DBG_CHN_MESG, "Class '%s':\n", name);
DEBUG_Printf(DBG_CHN_MESG, DEBUG_Printf(DBG_CHN_MESG,
"style=%08x wndProc=%08lx\n" "style=%08x wndProc=%08lx\n"
"inst=%04x icon=%04x cursor=%04x bkgnd=%04x\n" "inst=%p icon=%p cursor=%p bkgnd=%p\n"
"clsExtra=%d winExtra=%d\n", "clsExtra=%d winExtra=%d\n",
wca.style, (DWORD)wca.lpfnWndProc, wca.hInstance, wca.style, (DWORD)wca.lpfnWndProc, wca.hInstance,
wca.hIcon, wca.hCursor, wca.hbrBackground, wca.hIcon, wca.hCursor, wca.hbrBackground,
...@@ -265,7 +265,7 @@ static void DEBUG_InfoClass2(HWND hWnd, const char* name) ...@@ -265,7 +265,7 @@ static void DEBUG_InfoClass2(HWND hWnd, const char* name)
{ {
WNDCLASSEXA wca; WNDCLASSEXA wca;
if (!GetClassInfoEx(GetWindowLong(hWnd, GWL_HINSTANCE), name, &wca)) { if (!GetClassInfoEx((HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE), name, &wca)) {
DEBUG_Printf(DBG_CHN_MESG, "Cannot find class '%s'\n", name); DEBUG_Printf(DBG_CHN_MESG, "Cannot find class '%s'\n", name);
return; return;
} }
...@@ -273,7 +273,7 @@ static void DEBUG_InfoClass2(HWND hWnd, const char* name) ...@@ -273,7 +273,7 @@ static void DEBUG_InfoClass2(HWND hWnd, const char* name)
DEBUG_Printf(DBG_CHN_MESG, "Class '%s':\n", name); DEBUG_Printf(DBG_CHN_MESG, "Class '%s':\n", name);
DEBUG_Printf(DBG_CHN_MESG, DEBUG_Printf(DBG_CHN_MESG,
"style=%08x wndProc=%08lx\n" "style=%08x wndProc=%08lx\n"
"inst=%04x icon=%04x cursor=%04x bkgnd=%04x\n" "inst=%p icon=%p cursor=%p bkgnd=%p\n"
"clsExtra=%d winExtra=%d\n", "clsExtra=%d winExtra=%d\n",
wca.style, (DWORD)wca.lpfnWndProc, wca.hInstance, wca.style, (DWORD)wca.lpfnWndProc, wca.hInstance,
wca.hIcon, wca.hCursor, wca.hbrBackground, wca.hIcon, wca.hCursor, wca.hbrBackground,
...@@ -371,16 +371,16 @@ void DEBUG_InfoWindow(HWND hWnd) ...@@ -371,16 +371,16 @@ void DEBUG_InfoWindow(HWND hWnd)
/* FIXME missing fields: hmemTaskQ, hrgnUpdate, dce, flags, pProp, scroll */ /* FIXME missing fields: hmemTaskQ, hrgnUpdate, dce, flags, pProp, scroll */
DEBUG_Printf(DBG_CHN_MESG, DEBUG_Printf(DBG_CHN_MESG,
"next=0x%04x child=0x%04x parent=0x%04x owner=0x%04x class='%s'\n" "next=%p child=%p parent=%p owner=%p class='%s'\n"
"inst=%08lx active=%04x idmenu=%08lx\n" "inst=%p active=%p idmenu=%08lx\n"
"style=%08lx exstyle=%08lx wndproc=%08lx text='%s'\n" "style=%08lx exstyle=%08lx wndproc=%08lx text='%s'\n"
"client=%d,%d-%d,%d window=%d,%d-%d,%d sysmenu=%04x\n", "client=%d,%d-%d,%d window=%d,%d-%d,%d sysmenu=%p\n",
GetWindow(hWnd, GW_HWNDNEXT), GetWindow(hWnd, GW_HWNDNEXT),
GetWindow(hWnd, GW_CHILD), GetWindow(hWnd, GW_CHILD),
GetParent(hWnd), GetParent(hWnd),
GetWindow(hWnd, GW_OWNER), GetWindow(hWnd, GW_OWNER),
clsName, clsName,
GetWindowLong(hWnd, GWL_HINSTANCE), (HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE),
GetLastActivePopup(hWnd), GetLastActivePopup(hWnd),
GetWindowLong(hWnd, GWL_ID), GetWindowLong(hWnd, GWL_ID),
GetWindowLong(hWnd, GWL_STYLE), GetWindowLong(hWnd, GWL_STYLE),
...@@ -425,7 +425,7 @@ void DEBUG_WalkWindows(HWND hWnd, int indent) ...@@ -425,7 +425,7 @@ void DEBUG_WalkWindows(HWND hWnd, int indent)
strcpy(wndName, "-- Empty --"); strcpy(wndName, "-- Empty --");
/* FIXME: missing hmemTaskQ */ /* FIXME: missing hmemTaskQ */
DEBUG_Printf(DBG_CHN_MESG, "%*s%04x%*s", indent, "", hWnd, 13-indent,""); DEBUG_Printf(DBG_CHN_MESG, "%*s%04x%*s", indent, "", (UINT)hWnd, 13-indent,"");
DEBUG_Printf(DBG_CHN_MESG, "%-17.17s %08lx %08lx %.14s\n", DEBUG_Printf(DBG_CHN_MESG, "%-17.17s %08lx %08lx %.14s\n",
clsName, GetWindowLong(hWnd, GWL_STYLE), clsName, GetWindowLong(hWnd, GWL_STYLE),
GetWindowLong(hWnd, GWL_WNDPROC), wndName); GetWindowLong(hWnd, GWL_WNDPROC), wndName);
......
...@@ -584,13 +584,13 @@ void DEBUG_DumpModule(DWORD mod) ...@@ -584,13 +584,13 @@ void DEBUG_DumpModule(DWORD mod)
{ {
DBG_MODULE* wmod; DBG_MODULE* wmod;
if (!(wmod = DEBUG_FindModuleByHandle(mod, DMT_UNKNOWN)) && if (!(wmod = DEBUG_FindModuleByHandle((HANDLE)mod, DMT_UNKNOWN)) &&
!(wmod = DEBUG_FindModuleByAddr((void*)mod, DMT_UNKNOWN))) { !(wmod = DEBUG_FindModuleByAddr((void*)mod, DMT_UNKNOWN))) {
DEBUG_Printf(DBG_CHN_MESG, "'0x%08lx' is not a valid module handle or address\n", mod); DEBUG_Printf(DBG_CHN_MESG, "'0x%08lx' is not a valid module handle or address\n", mod);
return; return;
} }
DEBUG_Printf(DBG_CHN_MESG, "Module '%s' (handle=0x%08x) 0x%08lx-0x%08lx (%s, debug info %s)\n", DEBUG_Printf(DBG_CHN_MESG, "Module '%s' (handle=%p) 0x%08lx-0x%08lx (%s, debug info %s)\n",
wmod->module_name, wmod->handle, (DWORD)wmod->load_addr, wmod->module_name, wmod->handle, (DWORD)wmod->load_addr,
(DWORD)wmod->load_addr + wmod->size, (DWORD)wmod->load_addr + wmod->size,
DEBUG_GetModuleType(wmod->type), DEBUG_GetDbgInfo(wmod->dil)); DEBUG_GetModuleType(wmod->type), DEBUG_GetDbgInfo(wmod->dil));
......
...@@ -81,7 +81,6 @@ static void DEBUG_LocateDebugInfoFile(const char *filename, char *dbg_filename) ...@@ -81,7 +81,6 @@ static void DEBUG_LocateDebugInfoFile(const char *filename, char *dbg_filename)
static void* DEBUG_MapDebugInfoFile(const char* name, DWORD offset, DWORD size, static void* DEBUG_MapDebugInfoFile(const char* name, DWORD offset, DWORD size,
HANDLE* hFile, HANDLE* hMap) HANDLE* hFile, HANDLE* hMap)
{ {
OFSTRUCT ofs;
DWORD g_offset; /* offset aligned on map granuality */ DWORD g_offset; /* offset aligned on map granuality */
DWORD g_size; /* size to map, with offset aligned */ DWORD g_size; /* size to map, with offset aligned */
char* ret; char* ret;
...@@ -92,7 +91,7 @@ static void* DEBUG_MapDebugInfoFile(const char* name, DWORD offset, DWORD size, ...@@ -92,7 +91,7 @@ static void* DEBUG_MapDebugInfoFile(const char* name, DWORD offset, DWORD size,
char filename[MAX_PATHNAME_LEN]; char filename[MAX_PATHNAME_LEN];
DEBUG_LocateDebugInfoFile(name, filename); DEBUG_LocateDebugInfoFile(name, filename);
if ((*hFile = OpenFile(filename, &ofs, OF_READ)) == HFILE_ERROR) if ((*hFile = CreateFile(filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL)) == INVALID_HANDLE_VALUE)
return NULL; return NULL;
} }
......
...@@ -849,7 +849,7 @@ int DEBUG_main(int argc, char** argv) ...@@ -849,7 +849,7 @@ int DEBUG_main(int argc, char** argv)
HANDLE hEvent; HANDLE hEvent;
DWORD pid; DWORD pid;
if ((pid = atoi(argv[1])) != 0 && (hEvent = atoi(argv[2])) != 0) { if ((pid = atoi(argv[1])) != 0 && (hEvent = (HANDLE)atoi(argv[2])) != 0) {
BOOL ret = DEBUG_Attach(pid, TRUE); BOOL ret = DEBUG_Attach(pid, TRUE);
SetEvent(hEvent); SetEvent(hEvent);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment