winedbg: Win64 printf format fixes.
This commit is contained in:
parent
2bc33389e8
commit
6744929428
|
@ -7,7 +7,6 @@ APPMODE = -mconsole
|
|||
IMPORTS = psapi dbghelp advapi32 kernel32 ntdll
|
||||
DELAYIMPORTS = user32
|
||||
EXTRALIBS = @LIBPOLL@
|
||||
EXTRADEFS = -DWINE_NO_LONG_AS_INT
|
||||
|
||||
C_SRCS = \
|
||||
be_alpha.c \
|
||||
|
|
|
@ -141,10 +141,10 @@ static void be_i386_all_print_context(HANDLE hThread, const CONTEXT* ctx)
|
|||
dbg_printf(" FLSW:%04x", LOWORD(ctx->FloatSave.StatusWord));
|
||||
|
||||
/* Isolate the condition code bits - note they are not contiguous */
|
||||
dbg_printf("(CC:%ld%ld%ld%ld", (ctx->FloatSave.StatusWord & 0x00004000) >> 14,
|
||||
(ctx->FloatSave.StatusWord & 0x00000400) >> 10,
|
||||
(ctx->FloatSave.StatusWord & 0x00000200) >> 9,
|
||||
(ctx->FloatSave.StatusWord & 0x00000100) >> 8);
|
||||
dbg_printf("(CC:%d%d%d%d", (ctx->FloatSave.StatusWord & 0x00004000) >> 14,
|
||||
(ctx->FloatSave.StatusWord & 0x00000400) >> 10,
|
||||
(ctx->FloatSave.StatusWord & 0x00000200) >> 9,
|
||||
(ctx->FloatSave.StatusWord & 0x00000100) >> 8);
|
||||
|
||||
/* Now pull out hte 3 bit of the TOP stack pointer */
|
||||
dbg_printf(" TOP:%01x", (unsigned int) (ctx->FloatSave.StatusWord & 0x00003800) >> 11);
|
||||
|
@ -244,11 +244,11 @@ static void be_i386_print_context(HANDLE hThread, const CONTEXT* ctx, int all_re
|
|||
break;
|
||||
case AddrModeFlat:
|
||||
case AddrMode1632:
|
||||
dbg_printf("\n EIP:%08lx ESP:%08lx EBP:%08lx EFLAGS:%08lx(%s)\n",
|
||||
dbg_printf("\n EIP:%08x ESP:%08x EBP:%08x EFLAGS:%08x(%s)\n",
|
||||
ctx->Eip, ctx->Esp, ctx->Ebp, ctx->EFlags, buf);
|
||||
dbg_printf(" EAX:%08lx EBX:%08lx ECX:%08lx EDX:%08lx\n",
|
||||
dbg_printf(" EAX:%08x EBX:%08x ECX:%08x EDX:%08x\n",
|
||||
ctx->Eax, ctx->Ebx, ctx->Ecx, ctx->Edx);
|
||||
dbg_printf(" ESI:%08lx EDI:%08lx\n",
|
||||
dbg_printf(" ESI:%08x EDI:%08x\n",
|
||||
ctx->Esi, ctx->Edi);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -307,9 +307,8 @@ void break_add_break_from_lineno(int lineno, BOOL swbp)
|
|||
|
||||
il.SizeOfStruct = sizeof(il);
|
||||
if (!SymGetLineFromAddr(dbg_curr_process->handle, linear, &disp, &il))
|
||||
|
||||
{
|
||||
dbg_printf("Unable to add breakpoint (unknown address %lx)\n", linear);
|
||||
dbg_printf("Unable to add breakpoint (unknown address %x)\n", linear);
|
||||
return;
|
||||
}
|
||||
bkln.addr.Offset = 0;
|
||||
|
@ -725,7 +724,6 @@ static BOOL should_stop(int bpnum)
|
|||
*/
|
||||
BOOL break_should_continue(ADDRESS64* addr, DWORD code)
|
||||
{
|
||||
DWORD oldval = 0;
|
||||
enum dbg_exec_mode mode = dbg_curr_thread->exec_mode;
|
||||
|
||||
|
||||
|
@ -745,8 +743,8 @@ BOOL break_should_continue(ADDRESS64* addr, DWORD code)
|
|||
case be_xpoint_watch_write:
|
||||
dbg_printf("Stopped on watchpoint %d at ", dbg_curr_thread->stopped_xpoint);
|
||||
print_address(addr, TRUE);
|
||||
dbg_printf(" values: old=%lu new=%lu\n",
|
||||
oldval, dbg_curr_process->bp[dbg_curr_thread->stopped_xpoint].w.oldval);
|
||||
dbg_printf(" new value %u\n",
|
||||
dbg_curr_process->bp[dbg_curr_thread->stopped_xpoint].w.oldval);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -434,7 +434,7 @@ static WINE_EXCEPTION_FILTER(wine_dbg_cmd)
|
|||
dbg_interrupt_debuggee();
|
||||
return EXCEPTION_CONTINUE_EXECUTION;
|
||||
default:
|
||||
dbg_printf("\nException %lx\n", GetExceptionCode());
|
||||
dbg_printf("\nException %x\n", GetExceptionCode());
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -465,7 +465,7 @@ static BOOL handle_exception(struct gdb_context* gdbctx, EXCEPTION_DEBUG_INFO* e
|
|||
break;
|
||||
default:
|
||||
if (gdbctx->trace & GDBPXY_TRC_WIN32_EVENT)
|
||||
fprintf(stderr, "Unhandled exception code 0x%08lx\n", rec->ExceptionCode);
|
||||
fprintf(stderr, "Unhandled exception code 0x%08x\n", rec->ExceptionCode);
|
||||
gdbctx->last_sig = SIGABRT;
|
||||
ret = TRUE;
|
||||
break;
|
||||
|
@ -492,10 +492,10 @@ static void handle_debug_event(struct gdb_context* gdbctx, DEBUG_EVENT* de)
|
|||
dbg_set_process_name(gdbctx->process, buffer);
|
||||
|
||||
if (gdbctx->trace & GDBPXY_TRC_WIN32_EVENT)
|
||||
fprintf(stderr, "%08lx:%08lx: create process '%s'/%p @%08lx (%ld<%ld>)\n",
|
||||
fprintf(stderr, "%04x:%04x: create process '%s'/%p @%p (%u<%u>)\n",
|
||||
de->dwProcessId, de->dwThreadId,
|
||||
buffer, de->u.CreateProcessInfo.lpImageName,
|
||||
(unsigned long)(void*)de->u.CreateProcessInfo.lpStartAddress,
|
||||
de->u.CreateProcessInfo.lpStartAddress,
|
||||
de->u.CreateProcessInfo.dwDebugInfoFileOffset,
|
||||
de->u.CreateProcessInfo.nDebugInfoSize);
|
||||
|
||||
|
@ -504,9 +504,9 @@ static void handle_debug_event(struct gdb_context* gdbctx, DEBUG_EVENT* de)
|
|||
fprintf(stderr, "Couldn't initiate DbgHelp\n");
|
||||
|
||||
if (gdbctx->trace & GDBPXY_TRC_WIN32_EVENT)
|
||||
fprintf(stderr, "%08lx:%08lx: create thread I @%08lx\n",
|
||||
fprintf(stderr, "%04x:%04x: create thread I @%p\n",
|
||||
de->dwProcessId, de->dwThreadId,
|
||||
(unsigned long)(void*)de->u.CreateProcessInfo.lpStartAddress);
|
||||
de->u.CreateProcessInfo.lpStartAddress);
|
||||
|
||||
assert(dbg_curr_thread == NULL); /* shouldn't be there */
|
||||
dbg_add_thread(gdbctx->process, de->dwThreadId,
|
||||
|
@ -521,9 +521,9 @@ static void handle_debug_event(struct gdb_context* gdbctx, DEBUG_EVENT* de)
|
|||
de->u.LoadDll.fUnicode,
|
||||
buffer, sizeof(buffer));
|
||||
if (gdbctx->trace & GDBPXY_TRC_WIN32_EVENT)
|
||||
fprintf(stderr, "%08lx:%08lx: loads DLL %s @%08lx (%ld<%ld>)\n",
|
||||
fprintf(stderr, "%04x:%04x: loads DLL %s @%p (%u<%u>)\n",
|
||||
de->dwProcessId, de->dwThreadId,
|
||||
buffer, (unsigned long)de->u.LoadDll.lpBaseOfDll,
|
||||
buffer, de->u.LoadDll.lpBaseOfDll,
|
||||
de->u.LoadDll.dwDebugInfoFileOffset,
|
||||
de->u.LoadDll.nDebugInfoSize);
|
||||
SymLoadModule(gdbctx->process->handle, de->u.LoadDll.hFile, buffer, NULL,
|
||||
|
@ -532,8 +532,8 @@ static void handle_debug_event(struct gdb_context* gdbctx, DEBUG_EVENT* de)
|
|||
|
||||
case UNLOAD_DLL_DEBUG_EVENT:
|
||||
if (gdbctx->trace & GDBPXY_TRC_WIN32_EVENT)
|
||||
fprintf(stderr, "%08lx:%08lx: unload DLL @%08lx\n",
|
||||
de->dwProcessId, de->dwThreadId, (unsigned long)de->u.UnloadDll.lpBaseOfDll);
|
||||
fprintf(stderr, "%08x:%08x: unload DLL @%p\n",
|
||||
de->dwProcessId, de->dwThreadId, de->u.UnloadDll.lpBaseOfDll);
|
||||
SymUnloadModule(gdbctx->process->handle,
|
||||
(unsigned long)de->u.UnloadDll.lpBaseOfDll);
|
||||
break;
|
||||
|
@ -541,7 +541,7 @@ static void handle_debug_event(struct gdb_context* gdbctx, DEBUG_EVENT* de)
|
|||
case EXCEPTION_DEBUG_EVENT:
|
||||
assert(dbg_curr_thread);
|
||||
if (gdbctx->trace & GDBPXY_TRC_WIN32_EVENT)
|
||||
fprintf(stderr, "%08lx:%08lx: exception code=0x%08lx\n",
|
||||
fprintf(stderr, "%08x:%08x: exception code=0x%08x\n",
|
||||
de->dwProcessId, de->dwThreadId,
|
||||
de->u.Exception.ExceptionRecord.ExceptionCode);
|
||||
|
||||
|
@ -553,8 +553,8 @@ static void handle_debug_event(struct gdb_context* gdbctx, DEBUG_EVENT* de)
|
|||
|
||||
case CREATE_THREAD_DEBUG_EVENT:
|
||||
if (gdbctx->trace & GDBPXY_TRC_WIN32_EVENT)
|
||||
fprintf(stderr, "%08lx:%08lx: create thread D @%08lx\n",
|
||||
de->dwProcessId, de->dwThreadId, (unsigned long)(void*)de->u.CreateThread.lpStartAddress);
|
||||
fprintf(stderr, "%08x:%08x: create thread D @%p\n",
|
||||
de->dwProcessId, de->dwThreadId, de->u.CreateThread.lpStartAddress);
|
||||
|
||||
dbg_add_thread(gdbctx->process,
|
||||
de->dwThreadId,
|
||||
|
@ -564,7 +564,7 @@ static void handle_debug_event(struct gdb_context* gdbctx, DEBUG_EVENT* de)
|
|||
|
||||
case EXIT_THREAD_DEBUG_EVENT:
|
||||
if (gdbctx->trace & GDBPXY_TRC_WIN32_EVENT)
|
||||
fprintf(stderr, "%08lx:%08lx: exit thread (%ld)\n",
|
||||
fprintf(stderr, "%08x:%08x: exit thread (%u)\n",
|
||||
de->dwProcessId, de->dwThreadId, de->u.ExitThread.dwExitCode);
|
||||
|
||||
assert(dbg_curr_thread);
|
||||
|
@ -575,7 +575,7 @@ static void handle_debug_event(struct gdb_context* gdbctx, DEBUG_EVENT* de)
|
|||
|
||||
case EXIT_PROCESS_DEBUG_EVENT:
|
||||
if (gdbctx->trace & GDBPXY_TRC_WIN32_EVENT)
|
||||
fprintf(stderr, "%08lx:%08lx: exit process (%ld)\n",
|
||||
fprintf(stderr, "%08x:%08x: exit process (%u)\n",
|
||||
de->dwProcessId, de->dwThreadId, de->u.ExitProcess.dwExitCode);
|
||||
|
||||
dbg_del_process(gdbctx->process);
|
||||
|
@ -591,20 +591,20 @@ static void handle_debug_event(struct gdb_context* gdbctx, DEBUG_EVENT* de)
|
|||
de->u.DebugString.lpDebugStringData, TRUE,
|
||||
de->u.DebugString.fUnicode, buffer, sizeof(buffer));
|
||||
if (gdbctx->trace & GDBPXY_TRC_WIN32_EVENT)
|
||||
fprintf(stderr, "%08lx:%08lx: output debug string (%s)\n",
|
||||
fprintf(stderr, "%08x:%08x: output debug string (%s)\n",
|
||||
de->dwProcessId, de->dwThreadId, buffer);
|
||||
break;
|
||||
|
||||
case RIP_EVENT:
|
||||
if (gdbctx->trace & GDBPXY_TRC_WIN32_EVENT)
|
||||
fprintf(stderr, "%08lx:%08lx: rip error=%ld type=%ld\n",
|
||||
fprintf(stderr, "%08x:%08x: rip error=%u type=%u\n",
|
||||
de->dwProcessId, de->dwThreadId, de->u.RipInfo.dwError,
|
||||
de->u.RipInfo.dwType);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (gdbctx->trace & GDBPXY_TRC_WIN32_EVENT)
|
||||
fprintf(stderr, "%08lx:%08lx: unknown event (%ld)\n",
|
||||
fprintf(stderr, "%08x:%08x: unknown event (%u)\n",
|
||||
de->dwProcessId, de->dwThreadId, de->dwDebugEventCode);
|
||||
}
|
||||
}
|
||||
|
@ -615,10 +615,10 @@ static void resume_debuggee(struct gdb_context* gdbctx, DWORD cont)
|
|||
{
|
||||
if (!SetThreadContext(dbg_curr_thread->handle, &gdbctx->context))
|
||||
if (gdbctx->trace & GDBPXY_TRC_WIN32_ERROR)
|
||||
fprintf(stderr, "Cannot set context on thread %lu\n", dbg_curr_thread->tid);
|
||||
fprintf(stderr, "Cannot set context on thread %04x\n", dbg_curr_thread->tid);
|
||||
if (!ContinueDebugEvent(gdbctx->process->pid, dbg_curr_thread->tid, cont))
|
||||
if (gdbctx->trace & GDBPXY_TRC_WIN32_ERROR)
|
||||
fprintf(stderr, "Cannot continue on %lu (%lu)\n",
|
||||
fprintf(stderr, "Cannot continue on %04x (%x)\n",
|
||||
dbg_curr_thread->tid, cont);
|
||||
}
|
||||
else if (gdbctx->trace & GDBPXY_TRC_WIN32_ERROR)
|
||||
|
@ -635,10 +635,10 @@ static void resume_debuggee_thread(struct gdb_context* gdbctx, DWORD cont, unsig
|
|||
/* Windows debug and GDB don't seem to work well here, windows only likes ContinueDebugEvent being used on the reporter of the event */
|
||||
if (!SetThreadContext(dbg_curr_thread->handle, &gdbctx->context))
|
||||
if (gdbctx->trace & GDBPXY_TRC_WIN32_ERROR)
|
||||
fprintf(stderr, "Cannot set context on thread %lu\n", dbg_curr_thread->tid);
|
||||
fprintf(stderr, "Cannot set context on thread %04x\n", dbg_curr_thread->tid);
|
||||
if (!ContinueDebugEvent(gdbctx->process->pid, dbg_curr_thread->tid, cont))
|
||||
if (gdbctx->trace & GDBPXY_TRC_WIN32_ERROR)
|
||||
fprintf(stderr, "Cannot continue on %lu (%lu)\n",
|
||||
fprintf(stderr, "Cannot continue on %04x (%x)\n",
|
||||
dbg_curr_thread->tid, cont);
|
||||
}
|
||||
}
|
||||
|
@ -737,7 +737,7 @@ static void get_process_info(struct gdb_context* gdbctx, char* buffer, size_t le
|
|||
strcpy(buffer, "Running");
|
||||
}
|
||||
else
|
||||
snprintf(buffer, len, "Terminated (%lu)", status);
|
||||
snprintf(buffer, len, "Terminated (%u)", status);
|
||||
|
||||
switch (GetPriorityClass(gdbctx->process->handle))
|
||||
{
|
||||
|
@ -779,12 +779,12 @@ static void get_thread_info(struct gdb_context* gdbctx, unsigned tid,
|
|||
{
|
||||
case -1: break;
|
||||
case 0: strcpy(buffer, "Running"); break;
|
||||
default: snprintf(buffer, len, "Suspended (%lu)", status - 1);
|
||||
default: snprintf(buffer, len, "Suspended (%u)", status - 1);
|
||||
}
|
||||
ResumeThread(thd->handle);
|
||||
}
|
||||
else
|
||||
snprintf(buffer, len, "Terminated (exit code = %lu)", status);
|
||||
snprintf(buffer, len, "Terminated (exit code = %u)", status);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -980,7 +980,7 @@ static enum packet_return packet_continue(struct gdb_context* gdbctx)
|
|||
assert(gdbctx->in_packet_len == 0);
|
||||
if (dbg_curr_thread != gdbctx->exec_thread && gdbctx->exec_thread)
|
||||
if (gdbctx->trace & GDBPXY_TRC_COMMAND_FIXME)
|
||||
fprintf(stderr, "NIY: cont on %lu, while last thread is %lu\n",
|
||||
fprintf(stderr, "NIY: cont on %04x, while last thread is %04x\n",
|
||||
gdbctx->exec_thread->tid, dbg_curr_thread->tid);
|
||||
resume_debuggee(gdbctx, DBG_CONTINUE);
|
||||
wait_for_debuggee(gdbctx);
|
||||
|
@ -1092,7 +1092,7 @@ static enum packet_return packet_verbose(struct gdb_context* gdbctx)
|
|||
* left */
|
||||
if (dbg_curr_thread != gdbctx->exec_thread && gdbctx->exec_thread)
|
||||
if (gdbctx->trace & GDBPXY_TRC_COMMAND_FIXME)
|
||||
fprintf(stderr, "NIY: cont on %lu, while last thread is %lu\n",
|
||||
fprintf(stderr, "NIY: cont on %04x, while last thread is %04x\n",
|
||||
gdbctx->exec_thread->tid, dbg_curr_thread->tid);
|
||||
|
||||
/* deal with the threaded stuff first */
|
||||
|
@ -1193,7 +1193,7 @@ static enum packet_return packet_continue_signal(struct gdb_context* gdbctx)
|
|||
assert(gdbctx->in_packet_len == 2);
|
||||
if (dbg_curr_thread != gdbctx->exec_thread && gdbctx->exec_thread)
|
||||
if (gdbctx->trace & GDBPXY_TRC_COMMAND_FIXME)
|
||||
fprintf(stderr, "NIY: cont/sig on %lu, while last thread is %lu\n",
|
||||
fprintf(stderr, "NIY: cont/sig on %04x, while last thread is %04x\n",
|
||||
gdbctx->exec_thread->tid, dbg_curr_thread->tid);
|
||||
hex_from(&sig, gdbctx->in_packet, 1);
|
||||
/* cannot change signals on the fly */
|
||||
|
@ -1254,7 +1254,7 @@ static enum packet_return packet_write_registers(struct gdb_context* gdbctx)
|
|||
if (pctx != &gdbctx->context && !SetThreadContext(gdbctx->other_thread->handle, pctx))
|
||||
{
|
||||
if (gdbctx->trace & GDBPXY_TRC_WIN32_ERROR)
|
||||
fprintf(stderr, "Cannot set context on thread %lu\n", gdbctx->other_thread->tid);
|
||||
fprintf(stderr, "Cannot set context on thread %04x\n", gdbctx->other_thread->tid);
|
||||
return packet_error;
|
||||
}
|
||||
return packet_ok;
|
||||
|
@ -1429,7 +1429,7 @@ static enum packet_return packet_write_register(struct gdb_context* gdbctx)
|
|||
if (pctx != &gdbctx->context && !SetThreadContext(gdbctx->other_thread->handle, pctx))
|
||||
{
|
||||
if (gdbctx->trace & GDBPXY_TRC_WIN32_ERROR)
|
||||
fprintf(stderr, "Cannot set context for thread %lu\n", gdbctx->other_thread->tid);
|
||||
fprintf(stderr, "Cannot set context for thread %04x\n", gdbctx->other_thread->tid);
|
||||
return packet_error;
|
||||
}
|
||||
|
||||
|
@ -1451,9 +1451,9 @@ static void packet_query_monitor_wnd_helper(struct gdb_context* gdbctx, HWND hWn
|
|||
|
||||
packet_reply_open(gdbctx);
|
||||
packet_reply_catc(gdbctx, 'O');
|
||||
snprintf(buffer, sizeof(buffer),
|
||||
"%*s%04x%*s%-17.17s %08lx %08lx %.14s\n",
|
||||
indent, "", (UINT)hWnd, 13 - indent, "",
|
||||
snprintf(buffer, sizeof(buffer),
|
||||
"%*s%04lx%*s%-17.17s %08x %08x %.14s\n",
|
||||
indent, "", (ULONG_PTR)hWnd, 13 - indent, "",
|
||||
clsName, GetWindowLong(hWnd, GWL_STYLE),
|
||||
GetWindowLongPtr(hWnd, GWLP_WNDPROC), wndName);
|
||||
packet_reply_hex_to_str(gdbctx, buffer);
|
||||
|
@ -1515,7 +1515,7 @@ static void packet_query_monitor_process(struct gdb_context* gdbctx, int len, co
|
|||
packet_reply_open(gdbctx);
|
||||
packet_reply_catc(gdbctx, 'O');
|
||||
snprintf(buffer, sizeof(buffer),
|
||||
"%c%08lx %-8ld %08lx '%s'\n",
|
||||
"%c%08x %-8d %08x '%s'\n",
|
||||
deco, entry.th32ProcessID, entry.cntThreads,
|
||||
entry.th32ParentProcessID, entry.szExeFile);
|
||||
packet_reply_hex_to_str(gdbctx, buffer);
|
||||
|
@ -1578,9 +1578,8 @@ static void packet_query_monitor_mem(struct gdb_context* gdbctx, int len, const
|
|||
prot[0] = '\0';
|
||||
}
|
||||
packet_reply_open(gdbctx);
|
||||
snprintf(buffer, sizeof(buffer),
|
||||
"%08lx %08lx %s %s %s\n",
|
||||
(DWORD)addr, mbi.RegionSize, state, type, prot);
|
||||
snprintf(buffer, sizeof(buffer), "%08lx %08lx %s %s %s\n",
|
||||
(DWORD_PTR)addr, mbi.RegionSize, state, type, prot);
|
||||
packet_reply_catc(gdbctx, 'O');
|
||||
packet_reply_hex_to_str(gdbctx, buffer);
|
||||
packet_reply_close(gdbctx);
|
||||
|
@ -1772,7 +1771,7 @@ static enum packet_return packet_step(struct gdb_context* gdbctx)
|
|||
assert(gdbctx->in_packet_len == 0);
|
||||
if (dbg_curr_thread != gdbctx->exec_thread && gdbctx->exec_thread)
|
||||
if (gdbctx->trace & GDBPXY_TRC_COMMAND_FIXME)
|
||||
fprintf(stderr, "NIY: step on %lu, while last thread is %lu\n",
|
||||
fprintf(stderr, "NIY: step on %04x, while last thread is %04x\n",
|
||||
gdbctx->exec_thread->tid, dbg_curr_thread->tid);
|
||||
be_cpu->single_step(&gdbctx->context, TRUE);
|
||||
resume_debuggee(gdbctx, DBG_CONTINUE);
|
||||
|
|
|
@ -263,7 +263,7 @@ void info_win32_module(DWORD64 base)
|
|||
HeapFree(GetProcessHeap(), 0, im.mi);
|
||||
|
||||
if (base && !num_printed)
|
||||
dbg_printf("'0x%lx%08lx' is not a valid module address\n", (DWORD)(base >> 32), (DWORD)base);
|
||||
dbg_printf("'0x%x%08x' is not a valid module address\n", (DWORD)(base >> 32), (DWORD)base);
|
||||
}
|
||||
|
||||
struct class_walker
|
||||
|
@ -330,10 +330,10 @@ void info_win32_class(HWND hWnd, const char* name)
|
|||
}
|
||||
|
||||
dbg_printf("Class '%s':\n", name);
|
||||
dbg_printf("style=0x%08x wndProc=0x%08lx\n"
|
||||
dbg_printf("style=0x%08x wndProc=%p\n"
|
||||
"inst=%p icon=%p cursor=%p bkgnd=%p\n"
|
||||
"clsExtra=%d winExtra=%d\n",
|
||||
wca.style, (DWORD)wca.lpfnWndProc, wca.hInstance,
|
||||
wca.style, wca.lpfnWndProc, wca.hInstance,
|
||||
wca.hIcon, wca.hCursor, wca.hbrBackground,
|
||||
wca.cbClsExtra, wca.cbWndExtra);
|
||||
|
||||
|
@ -371,8 +371,8 @@ static void info_window(HWND hWnd, int indent)
|
|||
if (!GetWindowText(hWnd, wndName, sizeof(wndName)))
|
||||
strcpy(wndName, "-- Empty --");
|
||||
|
||||
dbg_printf("%*s%08x%*s %-17.17s %08lx %08lx %08lx %.14s\n",
|
||||
indent, "", (UINT)hWnd, 12 - indent, "",
|
||||
dbg_printf("%*s%08lx%*s %-17.17s %08x %08x %08x %.14s\n",
|
||||
indent, "", (DWORD_PTR)hWnd, 12 - indent, "",
|
||||
clsName, GetWindowLong(hWnd, GWL_STYLE),
|
||||
GetWindowLongPtr(hWnd, GWLP_WNDPROC),
|
||||
GetWindowThreadProcessId(hWnd, NULL), wndName);
|
||||
|
@ -413,9 +413,9 @@ void info_win32_window(HWND hWnd, BOOL detailed)
|
|||
|
||||
/* FIXME missing fields: hmemTaskQ, hrgnUpdate, dce, flags, pProp, scroll */
|
||||
dbg_printf("next=%p child=%p parent=%p owner=%p class='%s'\n"
|
||||
"inst=%p active=%p idmenu=%08lx\n"
|
||||
"style=0x%08lx exstyle=0x%08lx wndproc=0x%08lx text='%s'\n"
|
||||
"client=%ld,%ld-%ld,%ld window=%ld,%ld-%ld,%ld sysmenu=%p\n",
|
||||
"inst=%p active=%p idmenu=%08x\n"
|
||||
"style=0x%08x exstyle=0x%08x wndproc=0x%08x text='%s'\n"
|
||||
"client=%d,%d-%d,%d window=%d,%d-%d,%d sysmenu=%p\n",
|
||||
GetWindow(hWnd, GW_HWNDNEXT),
|
||||
GetWindow(hWnd, GW_CHILD),
|
||||
GetParent(hWnd),
|
||||
|
@ -463,7 +463,7 @@ void info_win32_processes(void)
|
|||
while (ok)
|
||||
{
|
||||
if (entry.th32ProcessID != GetCurrentProcessId())
|
||||
dbg_printf("%c%08lx %-8ld %08lx '%s'\n",
|
||||
dbg_printf("%c%08x %-8d %08x '%s'\n",
|
||||
(entry.th32ProcessID == current) ? '>' : ' ',
|
||||
entry.th32ProcessID, entry.cntThreads,
|
||||
entry.th32ParentProcessID, entry.szExeFile);
|
||||
|
@ -499,11 +499,11 @@ void info_win32_threads(void)
|
|||
{
|
||||
struct dbg_process* p = dbg_get_process(entry.th32OwnerProcessID);
|
||||
|
||||
dbg_printf("%08lx%s %s\n",
|
||||
dbg_printf("%08x%s %s\n",
|
||||
entry.th32OwnerProcessID, p ? " (D)" : "", p ? p->imageName : "");
|
||||
lastProcessId = entry.th32OwnerProcessID;
|
||||
}
|
||||
dbg_printf("\t%08lx %4ld%s\n",
|
||||
dbg_printf("\t%08x %4d%s\n",
|
||||
entry.th32ThreadID, entry.tpBasePri,
|
||||
(entry.th32ThreadID == dbg_curr_tid) ? " <==" : "");
|
||||
|
||||
|
@ -540,12 +540,12 @@ void info_win32_exceptions(DWORD tid)
|
|||
|
||||
if (!thread)
|
||||
{
|
||||
dbg_printf("Unknown thread id (0x%08lx) in current process\n", tid);
|
||||
dbg_printf("Unknown thread id (%04x) in current process\n", tid);
|
||||
return;
|
||||
}
|
||||
if (SuspendThread(thread->handle) == -1)
|
||||
{
|
||||
dbg_printf("Can't suspend thread id (0x%08lx)\n", tid);
|
||||
dbg_printf("Can't suspend thread id (%04x)\n", tid);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -598,7 +598,7 @@ void info_win32_segments(DWORD start, int length)
|
|||
flags[1] = (le.HighWord.Bits.Type & 0x2) ? 'w' : '-';
|
||||
flags[2] = '-';
|
||||
}
|
||||
dbg_printf("%04lx: sel=%04lx base=%08x limit=%08x %d-bit %c%c%c\n",
|
||||
dbg_printf("%04x: sel=%04x base=%08x limit=%08x %d-bit %c%c%c\n",
|
||||
i, (i << 3) | 7,
|
||||
(le.HighWord.Bits.BaseHi << 24) +
|
||||
(le.HighWord.Bits.BaseMid << 16) + le.BaseLow,
|
||||
|
@ -632,7 +632,7 @@ void info_win32_virtual(DWORD pid)
|
|||
hProc = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid);
|
||||
if (hProc == NULL)
|
||||
{
|
||||
dbg_printf("Cannot open process <%lu>\n", pid);
|
||||
dbg_printf("Cannot open process <%04x>\n", pid);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -675,7 +675,7 @@ void info_win32_virtual(DWORD pid)
|
|||
prot[0] = '\0';
|
||||
}
|
||||
dbg_printf("%08lx %08lx %s %s %s\n",
|
||||
(DWORD)addr, (DWORD)addr + mbi.RegionSize - 1, state, type, prot);
|
||||
(DWORD_PTR)addr, (DWORD_PTR)addr + mbi.RegionSize - 1, state, type, prot);
|
||||
if (addr + mbi.RegionSize < addr) /* wrap around ? */
|
||||
break;
|
||||
addr += mbi.RegionSize;
|
||||
|
|
|
@ -186,7 +186,7 @@ void memory_examine(const struct dbg_lvalue *lvalue, int count, char format)
|
|||
memory_report_invalid_addr(linear);
|
||||
break;
|
||||
}
|
||||
dbg_printf("{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
|
||||
dbg_printf("{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
|
||||
guid.Data1, guid.Data2, guid.Data3,
|
||||
guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3],
|
||||
guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]);
|
||||
|
@ -360,7 +360,7 @@ static void print_typed_basic(const struct dbg_lvalue* lvalue)
|
|||
dbg_printf("'%c'", (char)val_int);
|
||||
break;
|
||||
default:
|
||||
WINE_FIXME("Unsupported basetype %lu\n", bt);
|
||||
WINE_FIXME("Unsupported basetype %u\n", bt);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@ -454,7 +454,7 @@ static void print_typed_basic(const struct dbg_lvalue* lvalue)
|
|||
}
|
||||
break;
|
||||
default:
|
||||
WINE_FIXME("Unsupported tag %lu\n", tag);
|
||||
WINE_FIXME("Unsupported tag %u\n", tag);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -480,7 +480,7 @@ void print_basic(const struct dbg_lvalue* lvalue, int count, char format)
|
|||
switch (format)
|
||||
{
|
||||
case 'x':
|
||||
dbg_printf("0x%lx", (DWORD)(ULONG64)res);
|
||||
dbg_printf("0x%x", (DWORD)(ULONG64)res);
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
|
@ -568,7 +568,7 @@ void print_address(const ADDRESS64* addr, BOOLEAN with_line)
|
|||
|
||||
il.SizeOfStruct = sizeof(il);
|
||||
if (SymGetLineFromAddr(dbg_curr_process->handle, (DWORD_PTR)lin, &disp, &il))
|
||||
dbg_printf(" [%s:%lu]", il.FileName, il.LineNumber);
|
||||
dbg_printf(" [%s:%u]", il.FileName, il.LineNumber);
|
||||
im.SizeOfStruct = sizeof(im);
|
||||
if (SymGetModuleInfo(dbg_curr_process->handle, (DWORD_PTR)lin, &im))
|
||||
dbg_printf(" in %s", im.ModuleName);
|
||||
|
@ -656,6 +656,6 @@ BOOL memory_get_register(DWORD regno, DWORD** value, char* buffer, int len)
|
|||
return TRUE;
|
||||
}
|
||||
}
|
||||
if (buffer) snprintf(buffer, len, "<unknown register %lu>", regno);
|
||||
if (buffer) snprintf(buffer, len, "<unknown register %u>", regno);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -265,7 +265,7 @@ static void stack_print_addr_and_args(int nf)
|
|||
il.SizeOfStruct = sizeof(il);
|
||||
if (SymGetLineFromAddr(dbg_curr_process->handle, ihsf.InstructionOffset,
|
||||
&disp, &il))
|
||||
dbg_printf(" [%s:%lu]", il.FileName, il.LineNumber);
|
||||
dbg_printf(" [%s:%u]", il.FileName, il.LineNumber);
|
||||
dbg_printf(" in %s", im.ModuleName);
|
||||
}
|
||||
else dbg_printf(" in %s (+0x%lx)",
|
||||
|
@ -313,7 +313,7 @@ static void backtrace_tid(struct dbg_process* pcs, DWORD tid)
|
|||
struct dbg_thread* thread = dbg_curr_thread;
|
||||
|
||||
if (!(dbg_curr_thread = dbg_get_thread(pcs, tid)))
|
||||
dbg_printf("Unknown thread id (0x%lx) in process (0x%lx)\n", tid, pcs->pid);
|
||||
dbg_printf("Unknown thread id (%04x) in process (%04x)\n", tid, pcs->pid);
|
||||
else
|
||||
{
|
||||
CONTEXT saved_ctx = dbg_context;
|
||||
|
@ -325,7 +325,7 @@ static void backtrace_tid(struct dbg_process* pcs, DWORD tid)
|
|||
{
|
||||
if (!GetThreadContext(dbg_curr_thread->handle, &dbg_context))
|
||||
{
|
||||
dbg_printf("Can't get context for thread 0x%lx in current process\n",
|
||||
dbg_printf("Can't get context for thread %04x in current process\n",
|
||||
tid);
|
||||
}
|
||||
else
|
||||
|
@ -335,7 +335,7 @@ static void backtrace_tid(struct dbg_process* pcs, DWORD tid)
|
|||
}
|
||||
ResumeThread(dbg_curr_thread->handle);
|
||||
}
|
||||
else dbg_printf("Can't suspend thread 0x%lx in current process\n", tid);
|
||||
else dbg_printf("Can't suspend thread %04x in current process\n", tid);
|
||||
dbg_context = saved_ctx;
|
||||
}
|
||||
dbg_curr_thread = thread;
|
||||
|
@ -373,7 +373,7 @@ static void backtrace_all(void)
|
|||
{
|
||||
if (!dbg_attach_debuggee(entry.th32OwnerProcessID, FALSE))
|
||||
{
|
||||
dbg_printf("\nwarning: could not attach to 0x%lx\n",
|
||||
dbg_printf("\nwarning: could not attach to %04x\n",
|
||||
entry.th32OwnerProcessID);
|
||||
continue;
|
||||
}
|
||||
|
@ -381,7 +381,7 @@ static void backtrace_all(void)
|
|||
dbg_active_wait_for_first_exception();
|
||||
}
|
||||
|
||||
dbg_printf("\nBacktracing for thread 0x%lx in process 0x%lx (%s):\n",
|
||||
dbg_printf("\nBacktracing for thread %04x in process %04x (%s):\n",
|
||||
entry.th32ThreadID, dbg_curr_pid, dbg_curr_process->imageName);
|
||||
backtrace_tid(dbg_curr_process, entry.th32ThreadID);
|
||||
}
|
||||
|
|
|
@ -482,7 +482,7 @@ enum dbg_line_status symbol_get_function_line_status(const ADDRESS64* addr)
|
|||
case SymTagFunction:
|
||||
case SymTagPublicSymbol: break;
|
||||
default:
|
||||
WINE_FIXME("Unexpected sym-tag 0x%08lx\n", sym->Tag);
|
||||
WINE_FIXME("Unexpected sym-tag 0x%08x\n", sym->Tag);
|
||||
case SymTagData:
|
||||
return dbg_no_line_info;
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ BOOL dbg_attach_debuggee(DWORD pid, BOOL cofe)
|
|||
|
||||
if (!DebugActiveProcess(pid))
|
||||
{
|
||||
dbg_printf("Can't attach process %lx: error %ld\n", pid, GetLastError());
|
||||
dbg_printf("Can't attach process %04x: error %u\n", pid, GetLastError());
|
||||
dbg_del_process(dbg_curr_process);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ static unsigned dbg_exception_prolog(BOOL is_debug, const EXCEPTION_RECORD* rec)
|
|||
HeapFree(GetProcessHeap(), 0, last_file);
|
||||
last_name = strcpy(HeapAlloc(GetProcessHeap(), 0, strlen(si->Name) + 1), si->Name);
|
||||
last_file = strcpy(HeapAlloc(GetProcessHeap(), 0, strlen(il.FileName) + 1), il.FileName);
|
||||
dbg_printf("%s () at %s:%ld\n", last_name, last_file, il.LineNumber);
|
||||
dbg_printf("%s () at %s:%u\n", last_name, last_file, il.LineNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ static DWORD dbg_handle_exception(const EXCEPTION_RECORD* rec, BOOL first_chance
|
|||
|
||||
assert(dbg_curr_thread);
|
||||
|
||||
WINE_TRACE("exception=%lx first_chance=%c\n",
|
||||
WINE_TRACE("exception=%x first_chance=%c\n",
|
||||
rec->ExceptionCode, first_chance ? 'Y' : 'N');
|
||||
|
||||
switch (rec->ExceptionCode)
|
||||
|
@ -258,11 +258,11 @@ static DWORD dbg_handle_exception(const EXCEPTION_RECORD* rec, BOOL first_chance
|
|||
pThread = dbg_get_thread(dbg_curr_process, pThreadName->dwThreadID);
|
||||
if(!pThread)
|
||||
{
|
||||
dbg_printf("Thread ID=0x%lx not in our list of threads -> can't rename\n", pThreadName->dwThreadID);
|
||||
dbg_printf("Thread ID=%04x not in our list of threads -> can't rename\n", pThreadName->dwThreadID);
|
||||
return DBG_CONTINUE;
|
||||
}
|
||||
if (dbg_read_memory(pThreadName->szName, pThread->name, 9))
|
||||
dbg_printf("Thread ID=0x%lx renamed using MS VC6 extension (name==\"%s\")\n",
|
||||
dbg_printf("Thread ID=%04x renamed using MS VC6 extension (name==\"%s\")\n",
|
||||
pThread->tid, pThread->name);
|
||||
return DBG_CONTINUE;
|
||||
}
|
||||
|
@ -382,7 +382,7 @@ static DWORD dbg_handle_exception(const EXCEPTION_RECORD* rec, BOOL first_chance
|
|||
dbg_printf("floating point stack check");
|
||||
break;
|
||||
default:
|
||||
dbg_printf("0x%08lx", rec->ExceptionCode);
|
||||
dbg_printf("0x%08x", rec->ExceptionCode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -423,7 +423,7 @@ static void fetch_module_name(void* name_addr, BOOL unicode, void* mod_addr,
|
|||
if (!(h = GetModuleHandleA("psapi")) ||
|
||||
!(gpif = (void*)GetProcAddress(h, "GetProcessImageFileName")) ||
|
||||
!(gpif)(dbg_curr_process->handle, buffer, bufsz))
|
||||
snprintf(buffer, bufsz, "Process_%08lx", dbg_curr_pid);
|
||||
snprintf(buffer, bufsz, "Process_%08x", dbg_curr_pid);
|
||||
}
|
||||
else
|
||||
snprintf(buffer, bufsz, "DLL_%p", mod_addr);
|
||||
|
@ -448,12 +448,12 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
|
|||
case EXCEPTION_DEBUG_EVENT:
|
||||
if (!dbg_curr_thread)
|
||||
{
|
||||
WINE_ERR("%08lx:%08lx: not a registered process or thread (perhaps a 16 bit one ?)\n",
|
||||
WINE_ERR("%04x:%04x: not a registered process or thread (perhaps a 16 bit one ?)\n",
|
||||
de->dwProcessId, de->dwThreadId);
|
||||
break;
|
||||
}
|
||||
|
||||
WINE_TRACE("%08lx:%08lx: exception code=%08lx\n",
|
||||
WINE_TRACE("%04x:%04x: exception code=%08x\n",
|
||||
de->dwProcessId, de->dwThreadId,
|
||||
de->u.Exception.ExceptionRecord.ExceptionCode);
|
||||
|
||||
|
@ -486,10 +486,10 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
|
|||
de->u.CreateProcessInfo.lpBaseOfImage,
|
||||
buffer, sizeof(buffer), TRUE);
|
||||
|
||||
WINE_TRACE("%08lx:%08lx: create process '%s'/%p @%08lx (%ld<%ld>)\n",
|
||||
WINE_TRACE("%04x:%04x: create process '%s'/%p @%p (%u<%u>)\n",
|
||||
de->dwProcessId, de->dwThreadId,
|
||||
buffer, de->u.CreateProcessInfo.lpImageName,
|
||||
(unsigned long)(void*)de->u.CreateProcessInfo.lpStartAddress,
|
||||
de->u.CreateProcessInfo.lpStartAddress,
|
||||
de->u.CreateProcessInfo.dwDebugInfoFileOffset,
|
||||
de->u.CreateProcessInfo.nDebugInfoSize);
|
||||
dbg_set_process_name(dbg_curr_process, buffer);
|
||||
|
@ -498,11 +498,10 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
|
|||
dbg_printf("Couldn't initiate DbgHelp\n");
|
||||
if (!SymLoadModule(dbg_curr_process->handle, de->u.CreateProcessInfo.hFile, buffer, NULL,
|
||||
(unsigned long)de->u.CreateProcessInfo.lpBaseOfImage, 0))
|
||||
dbg_printf("couldn't load main module (%lx)\n", GetLastError());
|
||||
dbg_printf("couldn't load main module (%u)\n", GetLastError());
|
||||
|
||||
WINE_TRACE("%08lx:%08lx: create thread I @%08lx\n",
|
||||
de->dwProcessId, de->dwThreadId,
|
||||
(unsigned long)(void*)de->u.CreateProcessInfo.lpStartAddress);
|
||||
WINE_TRACE("%04x:%04x: create thread I @%p\n",
|
||||
de->dwProcessId, de->dwThreadId, de->u.CreateProcessInfo.lpStartAddress);
|
||||
|
||||
dbg_curr_thread = dbg_add_thread(dbg_curr_process,
|
||||
de->dwThreadId,
|
||||
|
@ -518,7 +517,7 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
|
|||
break;
|
||||
|
||||
case EXIT_PROCESS_DEBUG_EVENT:
|
||||
WINE_TRACE("%08lx:%08lx: exit process (%ld)\n",
|
||||
WINE_TRACE("%04x:%04x: exit process (%d)\n",
|
||||
de->dwProcessId, de->dwThreadId, de->u.ExitProcess.dwExitCode);
|
||||
|
||||
if (dbg_curr_process == NULL)
|
||||
|
@ -527,13 +526,12 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
|
|||
break;
|
||||
}
|
||||
tgt_process_active_close_process(dbg_curr_process, FALSE);
|
||||
dbg_printf("Process of pid=0x%08lx has terminated\n", de->dwProcessId);
|
||||
dbg_printf("Process of pid=%04x has terminated\n", de->dwProcessId);
|
||||
break;
|
||||
|
||||
case CREATE_THREAD_DEBUG_EVENT:
|
||||
WINE_TRACE("%08lx:%08lx: create thread D @%08lx\n",
|
||||
de->dwProcessId, de->dwThreadId,
|
||||
(unsigned long)(void*)de->u.CreateThread.lpStartAddress);
|
||||
WINE_TRACE("%04x:%04x: create thread D @%p\n",
|
||||
de->dwProcessId, de->dwThreadId, de->u.CreateThread.lpStartAddress);
|
||||
|
||||
if (dbg_curr_process == NULL)
|
||||
{
|
||||
|
@ -559,7 +557,7 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
|
|||
break;
|
||||
|
||||
case EXIT_THREAD_DEBUG_EVENT:
|
||||
WINE_TRACE("%08lx:%08lx: exit thread (%ld)\n",
|
||||
WINE_TRACE("%04x:%04x: exit thread (%d)\n",
|
||||
de->dwProcessId, de->dwThreadId, de->u.ExitThread.dwExitCode);
|
||||
|
||||
if (dbg_curr_thread == NULL)
|
||||
|
@ -582,9 +580,9 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
|
|||
de->u.LoadDll.lpBaseOfDll,
|
||||
buffer, sizeof(buffer), FALSE);
|
||||
|
||||
WINE_TRACE("%08lx:%08lx: loads DLL %s @%08lx (%ld<%ld>)\n",
|
||||
WINE_TRACE("%04x:%04x: loads DLL %s @%p (%u<%u>)\n",
|
||||
de->dwProcessId, de->dwThreadId,
|
||||
buffer, (unsigned long)de->u.LoadDll.lpBaseOfDll,
|
||||
buffer, de->u.LoadDll.lpBaseOfDll,
|
||||
de->u.LoadDll.dwDebugInfoFileOffset,
|
||||
de->u.LoadDll.nDebugInfoSize);
|
||||
SymLoadModule(dbg_curr_process->handle, de->u.LoadDll.hFile, buffer, NULL,
|
||||
|
@ -601,9 +599,9 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
|
|||
break;
|
||||
|
||||
case UNLOAD_DLL_DEBUG_EVENT:
|
||||
WINE_TRACE("%08lx:%08lx: unload DLL @%08lx\n",
|
||||
WINE_TRACE("%04x:%04x: unload DLL @%p\n",
|
||||
de->dwProcessId, de->dwThreadId,
|
||||
(unsigned long)de->u.UnloadDll.lpBaseOfDll);
|
||||
de->u.UnloadDll.lpBaseOfDll);
|
||||
break_delete_xpoints_from_module((unsigned long)de->u.UnloadDll.lpBaseOfDll);
|
||||
SymUnloadModule(dbg_curr_process->handle,
|
||||
(unsigned long)de->u.UnloadDll.lpBaseOfDll);
|
||||
|
@ -619,18 +617,18 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
|
|||
memory_get_string(dbg_curr_process,
|
||||
de->u.DebugString.lpDebugStringData, TRUE,
|
||||
de->u.DebugString.fUnicode, buffer, sizeof(buffer));
|
||||
WINE_TRACE("%08lx:%08lx: output debug string (%s)\n",
|
||||
WINE_TRACE("%04x:%04x: output debug string (%s)\n",
|
||||
de->dwProcessId, de->dwThreadId, buffer);
|
||||
break;
|
||||
|
||||
case RIP_EVENT:
|
||||
WINE_TRACE("%08lx:%08lx: rip error=%ld type=%ld\n",
|
||||
WINE_TRACE("%04x:%04x: rip error=%u type=%u\n",
|
||||
de->dwProcessId, de->dwThreadId, de->u.RipInfo.dwError,
|
||||
de->u.RipInfo.dwType);
|
||||
break;
|
||||
|
||||
default:
|
||||
WINE_TRACE("%08lx:%08lx: unknown event (%ld)\n",
|
||||
WINE_TRACE("%04x:%04x: unknown event (%x)\n",
|
||||
de->dwProcessId, de->dwThreadId, de->dwDebugEventCode);
|
||||
}
|
||||
if (!cont) return TRUE; /* stop execution */
|
||||
|
@ -654,12 +652,12 @@ static void dbg_resume_debuggee(DWORD cont)
|
|||
if (dbg_curr_thread)
|
||||
{
|
||||
if (!SetThreadContext(dbg_curr_thread->handle, &dbg_context))
|
||||
dbg_printf("Cannot set ctx on %lu\n", dbg_curr_tid);
|
||||
dbg_printf("Cannot set ctx on %04x\n", dbg_curr_tid);
|
||||
}
|
||||
}
|
||||
dbg_interactiveP = FALSE;
|
||||
if (!ContinueDebugEvent(dbg_curr_pid, dbg_curr_tid, cont))
|
||||
dbg_printf("Cannot continue on %lu (%lu)\n", dbg_curr_tid, cont);
|
||||
dbg_printf("Cannot continue on %04x (%08x)\n", dbg_curr_tid, cont);
|
||||
}
|
||||
|
||||
static void wait_exception(void)
|
||||
|
@ -805,7 +803,7 @@ enum dbg_start dbg_active_attach(int argc, char* argv[])
|
|||
}
|
||||
if (!SetEvent((HANDLE)evt))
|
||||
{
|
||||
WINE_ERR("Invalid event handle: %lx\n", evt);
|
||||
WINE_ERR("Invalid event handle: %x\n", evt);
|
||||
return start_error_init;
|
||||
}
|
||||
CloseHandle((HANDLE)evt);
|
||||
|
|
|
@ -193,7 +193,7 @@ static enum dbg_start minidump_do_reload(struct tgt_process_minidump_data* data)
|
|||
const char *str;
|
||||
char tmp[128];
|
||||
|
||||
dbg_printf("WineDbg starting on minidump on pid %lu\n", pid);
|
||||
dbg_printf("WineDbg starting on minidump on pid %04x\n", pid);
|
||||
switch (msi->ProcessorArchitecture)
|
||||
{
|
||||
case PROCESSOR_ARCHITECTURE_UNKNOWN:
|
||||
|
@ -271,7 +271,7 @@ static enum dbg_start minidump_do_reload(struct tgt_process_minidump_data* data)
|
|||
break;
|
||||
default: str = "???"; break;
|
||||
}
|
||||
dbg_printf(" on Windows %s (%lu)\n", str, msi->BuildNumber);
|
||||
dbg_printf(" on Windows %s (%u)\n", str, msi->BuildNumber);
|
||||
/* FIXME CSD: msi->CSDVersionRva */
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ LONGLONG types_extract_as_longlong(const struct dbg_lvalue* lvalue)
|
|||
rtn = (unsigned)memory_to_linear_addr(&lvalue->addr);
|
||||
break;
|
||||
default:
|
||||
WINE_FIXME("Unsupported tag %lu\n", tag);
|
||||
WINE_FIXME("Unsupported tag %u\n", tag);
|
||||
RaiseException(DEBUG_STATUS_NOT_AN_INTEGER, 0, 0, NULL);
|
||||
break;
|
||||
}
|
||||
|
@ -545,7 +545,7 @@ void print_value(const struct dbg_lvalue* lvalue, char format, int level)
|
|||
print_value(&lvalue_field, format, level);
|
||||
break;
|
||||
default:
|
||||
WINE_FIXME("Unknown tag (%lu)\n", tag);
|
||||
WINE_FIXME("Unknown tag (%u)\n", tag);
|
||||
RaiseException(DEBUG_STATUS_INTERNAL_ERROR, 0, 0, NULL);
|
||||
break;
|
||||
}
|
||||
|
@ -560,7 +560,7 @@ static BOOL CALLBACK print_types_cb(PSYMBOL_INFO sym, ULONG size, void* ctx)
|
|||
struct dbg_type type;
|
||||
type.module = sym->ModBase;
|
||||
type.id = sym->TypeIndex;
|
||||
dbg_printf("Mod: %08lx ID: %08lx \n", type.module, type.id);
|
||||
dbg_printf("Mod: %08x ID: %08lx \n", type.module, type.id);
|
||||
types_print_type(&type, TRUE);
|
||||
dbg_printf("\n");
|
||||
return TRUE;
|
||||
|
@ -617,7 +617,7 @@ int types_print_type(const struct dbg_type* type, BOOL details)
|
|||
case UdtStruct: dbg_printf("struct %s", name); break;
|
||||
case UdtUnion: dbg_printf("union %s", name); break;
|
||||
case UdtClass: dbg_printf("class %s", name); break;
|
||||
default: WINE_ERR("Unsupported UDT type (%ld) for %s\n", udt, name); break;
|
||||
default: WINE_ERR("Unsupported UDT type (%d) for %s\n", udt, name); break;
|
||||
}
|
||||
if (details &&
|
||||
types_get_info(type, TI_GET_CHILDRENCOUNT, &count))
|
||||
|
@ -704,7 +704,7 @@ int types_print_type(const struct dbg_type* type, BOOL details)
|
|||
dbg_printf(name);
|
||||
break;
|
||||
default:
|
||||
WINE_ERR("Unknown type %lu for %s\n", tag, name);
|
||||
WINE_ERR("Unknown type %u for %s\n", tag, name);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -750,7 +750,7 @@ BOOL types_get_info(const struct dbg_type* type, IMAGEHLP_SYMBOL_TYPE_INFO ti, v
|
|||
case btLong: name = longW; break;
|
||||
case btULong: name = ulongW; break;
|
||||
case btComplex: name = complexW; break;
|
||||
default: WINE_FIXME("Unsupported basic type %ld\n", bt); return FALSE;
|
||||
default: WINE_FIXME("Unsupported basic type %u\n", bt); return FALSE;
|
||||
}
|
||||
X(WCHAR*) = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(name) + 1) * sizeof(WCHAR));
|
||||
if (X(WCHAR*))
|
||||
|
|
|
@ -268,7 +268,7 @@ struct dbg_process* dbg_add_process(const struct be_process_io* pio, DWORD pid,
|
|||
{
|
||||
if (p->handle != 0)
|
||||
{
|
||||
WINE_ERR("Process (%lu) is already defined\n", pid);
|
||||
WINE_ERR("Process (%04x) is already defined\n", pid);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -401,7 +401,7 @@ struct dbg_thread* dbg_add_thread(struct dbg_process* p, DWORD tid,
|
|||
t->curr_frame = -1;
|
||||
t->addr_mode = AddrModeFlat;
|
||||
|
||||
snprintf(t->name, sizeof(t->name), "0x%08lx", tid);
|
||||
snprintf(t->name, sizeof(t->name), "%04x", tid);
|
||||
|
||||
t->next = p->threads;
|
||||
t->prev = NULL;
|
||||
|
@ -547,7 +547,7 @@ int main(int argc, char** argv)
|
|||
hFile = parser_generate_command_file(argv[0], NULL);
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
dbg_printf("Couldn't open temp file (%lu)\n", GetLastError());
|
||||
dbg_printf("Couldn't open temp file (%u)\n", GetLastError());
|
||||
return 1;
|
||||
}
|
||||
argc--; argv++;
|
||||
|
@ -560,7 +560,7 @@ int main(int argc, char** argv)
|
|||
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
dbg_printf("Couldn't open file %s (%lu)\n", argv[0], GetLastError());
|
||||
dbg_printf("Couldn't open file %s (%u)\n", argv[0], GetLastError());
|
||||
return 1;
|
||||
}
|
||||
argc--; argv++;
|
||||
|
@ -586,7 +586,7 @@ int main(int argc, char** argv)
|
|||
|
||||
if (dbg_curr_process)
|
||||
{
|
||||
dbg_printf("WineDbg starting on pid 0x%lx\n", dbg_curr_pid);
|
||||
dbg_printf("WineDbg starting on pid %04x\n", dbg_curr_pid);
|
||||
if (dbg_curr_process->active_debuggee) dbg_active_wait_for_first_exception();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue