winedbg win64 printf format warning fixes
Michael [Plouj] Ploujnikov
ploujj at gmail.com
Sun Oct 8 14:02:10 CDT 2006
--
() ASCII Ribbon Campaign
/\ - against HTML mail & vCards
-------------- next part --------------
From 37795ebb9384415cbdddddcd686b6a165fbd2a2d Mon Sep 17 00:00:00 2001
From: Michael Ploujnikov <ploujj at gmail.com>
Date: Sun, 8 Oct 2006 13:22:59 -0400
Subject: [PATCH] Janitorial Win64 printf format warning fixes for winedbg
Removed DWINE_NO_LONG_AS_INT from programs/winedbg/Makefile.in
Fixed resulting warnings
Michael Ploujnikov
ploujj at gmail.com
---
programs/winedbg/Makefile.in | 1 -
programs/winedbg/be_cpu.h | 2 +
programs/winedbg/be_i386.c | 14 ++++-----
programs/winedbg/break.c | 4 +--
programs/winedbg/dbg.y | 2 +
programs/winedbg/gdbproxy.c | 62 ++++++++++++++++++++-------------------
programs/winedbg/info.c | 28 +++++++++---------
programs/winedbg/memory.c | 8 +++--
programs/winedbg/stack.c | 16 +++++-----
programs/winedbg/symbol.c | 6 ++--
programs/winedbg/tgt_active.c | 62 ++++++++++++++++++++-------------------
programs/winedbg/tgt_minidump.c | 8 +++--
programs/winedbg/types.c | 12 ++++----
programs/winedbg/winedbg.c | 10 +++---
14 files changed, 117 insertions(+), 118 deletions(-)
diff --git a/programs/winedbg/Makefile.in b/programs/winedbg/Makefile.in
index 6f3e585..dd343db 100644
--- a/programs/winedbg/Makefile.in
+++ b/programs/winedbg/Makefile.in
@@ -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 \
diff --git a/programs/winedbg/be_cpu.h b/programs/winedbg/be_cpu.h
index 4111dff..d522713 100644
--- a/programs/winedbg/be_cpu.h
+++ b/programs/winedbg/be_cpu.h
@@ -84,7 +84,7 @@ struct backend_cpu
/* Inserts an Xpoint in the CPU context and/or debuggee address space */
unsigned (*insert_Xpoint)(HANDLE hProcess, const struct be_process_io* pio,
CONTEXT* ctx, enum be_xpoint_type type,
- void* addr, unsigned long* val, unsigned size);
+ void* addr, DWORD* val, unsigned size);
/* Removes an Xpoint in the CPU context and/or debuggee address space */
unsigned (*remove_Xpoint)(HANDLE hProcess, const struct be_process_io* pio,
CONTEXT* ctx, enum be_xpoint_type type,
diff --git a/programs/winedbg/be_i386.c b/programs/winedbg/be_i386.c
index 696e125..d3ecea2 100644
--- a/programs/winedbg/be_i386.c
+++ b/programs/winedbg/be_i386.c
@@ -130,7 +130,7 @@ static void be_i386_all_print_context(HA
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,
+ 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);
@@ -233,11 +233,11 @@ static void be_i386_print_context(HANDLE
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;
}
@@ -436,7 +436,7 @@ #define DR7_GLOBAL_SLOWDOWN (0x200)
#define DR7_ENABLE_MASK(dr) (1<<(DR7_LOCAL_ENABLE_SHIFT+DR7_ENABLE_SIZE*(dr)))
#define IS_DR7_SET(ctrl,dr) ((ctrl)&DR7_ENABLE_MASK(dr))
-static inline int be_i386_get_unused_DR(CONTEXT* ctx, unsigned long** r)
+static inline int be_i386_get_unused_DR(CONTEXT* ctx, DWORD** r)
{
if (!IS_DR7_SET(ctx->Dr7, 0))
{
@@ -465,11 +465,11 @@ static inline int be_i386_get_unused_DR(
static unsigned be_i386_insert_Xpoint(HANDLE hProcess, const struct be_process_io* pio,
CONTEXT* ctx, enum be_xpoint_type type,
- void* addr, unsigned long* val, unsigned size)
+ void* addr, DWORD* val, unsigned size)
{
unsigned char ch;
SIZE_T sz;
- unsigned long* pr;
+ DWORD* pr;
int reg;
unsigned long bits;
diff --git a/programs/winedbg/break.c b/programs/winedbg/break.c
index 3a4c1e5..1d175c0 100644
--- a/programs/winedbg/break.c
+++ b/programs/winedbg/break.c
@@ -309,7 +309,7 @@ void break_add_break_from_lineno(int lin
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;
@@ -774,7 +774,7 @@ BOOL break_should_continue(ADDRESS64* ad
dbg_printf("Stopped on watchpoint %d at ", dbg_curr_thread->stopped_xpoint);
print_address(addr, TRUE);
- dbg_printf(" values: old=%lu new=%lu\n",
+ dbg_printf(" values: old=%u new=%u\n",
oldval, dbg_curr_process->bp[dbg_curr_thread->stopped_xpoint].w.oldval);
return FALSE;
}
diff --git a/programs/winedbg/dbg.y b/programs/winedbg/dbg.y
index 0c225e1..3b5414a 100644
--- a/programs/winedbg/dbg.y
+++ b/programs/winedbg/dbg.y
@@ -434,7 +434,7 @@ static WINE_EXCEPTION_FILTER(wine_dbg_cm
dbg_interrupt_debuggee();
return EXCEPTION_CONTINUE_EXECUTION;
default:
- dbg_printf("\nException %lx\n", GetExceptionCode());
+ dbg_printf("\nException %x\n", GetExceptionCode());
break;
}
diff --git a/programs/winedbg/gdbproxy.c b/programs/winedbg/gdbproxy.c
index bb808c2..4d6edd7 100644
--- a/programs/winedbg/gdbproxy.c
+++ b/programs/winedbg/gdbproxy.c
@@ -76,7 +76,7 @@ struct gdb_ctx_Xpoint
{
enum be_xpoint_type type; /* -1 means free */
void* addr;
- unsigned long val;
+ DWORD val;
};
struct gdb_context
@@ -465,7 +465,7 @@ static BOOL handle_exception(struct gdb_
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,7 +492,7 @@ static void handle_debug_event(struct gd
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, "%08x:%08x: create process '%s'/%p @%08lx (%d<%d>)\n",
de->dwProcessId, de->dwThreadId,
buffer, de->u.CreateProcessInfo.lpImageName,
(unsigned long)(void*)de->u.CreateProcessInfo.lpStartAddress,
@@ -504,7 +504,7 @@ static void handle_debug_event(struct gd
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, "%08x:%08x: create thread I @%08lx\n",
de->dwProcessId, de->dwThreadId,
(unsigned long)(void*)de->u.CreateProcessInfo.lpStartAddress);
@@ -521,7 +521,7 @@ static void handle_debug_event(struct gd
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, "%08x:%08x: loads DLL %s @%08lx (%d<%d>)\n",
de->dwProcessId, de->dwThreadId,
buffer, (unsigned long)de->u.LoadDll.lpBaseOfDll,
de->u.LoadDll.dwDebugInfoFileOffset,
@@ -532,7 +532,7 @@ static void handle_debug_event(struct gd
case UNLOAD_DLL_DEBUG_EVENT:
if (gdbctx->trace & GDBPXY_TRC_WIN32_EVENT)
- fprintf(stderr, "%08lx:%08lx: unload DLL @%08lx\n",
+ fprintf(stderr, "%08x:%08x: unload DLL @%08lx\n",
de->dwProcessId, de->dwThreadId, (unsigned long)de->u.UnloadDll.lpBaseOfDll);
SymUnloadModule(gdbctx->process->handle,
(unsigned long)de->u.UnloadDll.lpBaseOfDll);
@@ -541,7 +541,7 @@ static void handle_debug_event(struct gd
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,7 +553,7 @@ static void handle_debug_event(struct gd
case CREATE_THREAD_DEBUG_EVENT:
if (gdbctx->trace & GDBPXY_TRC_WIN32_EVENT)
- fprintf(stderr, "%08lx:%08lx: create thread D @%08lx\n",
+ fprintf(stderr, "%08x:%08x: create thread D @%08lx\n",
de->dwProcessId, de->dwThreadId, (unsigned long)(void*)de->u.CreateThread.lpStartAddress);
dbg_add_thread(gdbctx->process,
@@ -564,7 +564,7 @@ static void handle_debug_event(struct gd
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 (%d)\n",
de->dwProcessId, de->dwThreadId, de->u.ExitThread.dwExitCode);
assert(dbg_curr_thread);
@@ -575,7 +575,7 @@ static void handle_debug_event(struct gd
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 (%d)\n",
de->dwProcessId, de->dwThreadId, de->u.ExitProcess.dwExitCode);
dbg_del_process(gdbctx->process);
@@ -591,20 +591,20 @@ static void handle_debug_event(struct gd
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=%d type=%d\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 (%d)\n",
de->dwProcessId, de->dwThreadId, de->dwDebugEventCode);
}
}
@@ -615,10 +615,10 @@ static void resume_debuggee(struct gd
{
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 %u\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 %u (%lu)\n",
dbg_curr_thread->tid, cont);
}
else if (gdbctx->trace & GDBPXY_TRC_WIN32_ERROR)
@@ -635,10 +635,10 @@ static void resume_debuggee_thread(st
/* 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 %u\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 %u (%lu)\n",
dbg_curr_thread->tid, cont);
}
}
@@ -725,7 +725,7 @@ static void detach_debuggee(struct gdb_c
static void get_process_info(struct gdb_context* gdbctx, char* buffer, size_t len)
{
- unsigned long status;
+ DWORD status;
if (!GetExitCodeProcess(gdbctx->process->handle, &status))
{
@@ -737,7 +737,7 @@ static void get_process_info(struct gdb_
strcpy(buffer, "Running");
}
else
- snprintf(buffer, len, "Terminated (%lu)", status);
+ snprintf(buffer, len, "Terminated (%u)", status);
switch (GetPriorityClass(gdbctx->process->handle))
{
@@ -760,7 +760,7 @@ static void get_thread_info(struct gdb_c
char* buffer, size_t len)
{
struct dbg_thread* thd;
- unsigned long status;
+ DWORD status;
int prio;
/* FIXME: use the size of buffer */
@@ -779,12 +779,12 @@ static void get_thread_info(struct gdb_c
{
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_continu
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 %u, while last thread is %u\n",
gdbctx->exec_thread->tid, dbg_curr_thread->tid);
resume_debuggee(gdbctx, DBG_CONTINUE);
wait_for_debuggee(gdbctx);
@@ -1092,7 +1092,7 @@ #endif
* 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 %u, while last thread is %u\n",
gdbctx->exec_thread->tid, dbg_curr_thread->tid);
/* deal with the threaded stuff first */
@@ -1193,7 +1193,7 @@ static enum packet_return packet_continu
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 %u, while last thread is %u\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_r
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 %u\n", gdbctx->other_thread->tid);
return packet_error;
}
return packet_ok;
@@ -1429,7 +1429,7 @@ static enum packet_return packet_write_r
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 %u\n", gdbctx->other_thread->tid);
return packet_error;
}
@@ -1452,7 +1452,7 @@ static void packet_query_monitor_wnd_hel
packet_reply_open(gdbctx);
packet_reply_catc(gdbctx, 'O');
snprintf(buffer, sizeof(buffer),
- "%*s%04x%*s%-17.17s %08lx %08lx %.14s\n",
+ "%*s%04x%*s%-17.17s %08x %08x %.14s\n",
indent, "", (UINT)hWnd, 13 - indent, "",
clsName, GetWindowLong(hWnd, GWL_STYLE),
GetWindowLongPtr(hWnd, GWLP_WNDPROC), wndName);
@@ -1515,7 +1515,7 @@ static void packet_query_monitor_process
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);
@@ -1579,7 +1579,7 @@ static void packet_query_monitor_mem(str
}
packet_reply_open(gdbctx);
snprintf(buffer, sizeof(buffer),
- "%08lx %08lx %s %s %s\n",
+ "%08x %08lx %s %s %s\n",
(DWORD)addr, mbi.RegionSize, state, type, prot);
packet_reply_catc(gdbctx, 'O');
packet_reply_hex_to_str(gdbctx, buffer);
@@ -1772,7 +1772,7 @@ static enum packet_return packet_step(st
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 %u, while last thread is %u\n",
gdbctx->exec_thread->tid, dbg_curr_thread->tid);
be_cpu->single_step(&gdbctx->context, TRUE);
resume_debuggee(gdbctx, DBG_CONTINUE);
diff --git a/programs/winedbg/info.c b/programs/winedbg/info.c
index c5b7b1e..771a5b5 100644
--- a/programs/winedbg/info.c
+++ b/programs/winedbg/info.c
@@ -263,7 +263,7 @@ void info_win32_module(DWORD base)
HeapFree(GetProcessHeap(), 0, im.mi);
if (base && !num_printed)
- dbg_printf("'0x%08lx' is not a valid module address\n", base);
+ dbg_printf("'0x%08x' is not a valid module address\n", base);
}
struct class_walker
@@ -330,7 +330,7 @@ void info_win32_class(HWND hWnd, const c
}
dbg_printf("Class '%s':\n", name);
- dbg_printf("style=0x%08x wndProc=0x%08lx\n"
+ dbg_printf("style=0x%08x wndProc=0x%08x\n"
"inst=%p icon=%p cursor=%p bkgnd=%p\n"
"clsExtra=%d winExtra=%d\n",
wca.style, (DWORD)wca.lpfnWndProc, wca.hInstance,
@@ -371,7 +371,7 @@ static void info_window(HWND hWnd, int i
if (!GetWindowText(hWnd, wndName, sizeof(wndName)))
strcpy(wndName, "-- Empty --");
- dbg_printf("%*s%08x%*s %-17.17s %08lx %08lx %08lx %.14s\n",
+ dbg_printf("%*s%08x%*s %-17.17s %08x %08x %08x %.14s\n",
indent, "", (UINT)hWnd, 12 - indent, "",
clsName, GetWindowLong(hWnd, GWL_STYLE),
GetWindowLongPtr(hWnd, GWLP_WNDPROC),
@@ -413,9 +413,9 @@ void info_win32_window(HWND hWnd, BOOL d
/* 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 (0x%08x) 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 (0x%08x)\n", tid);
return;
}
}
@@ -598,7 +598,7 @@ void info_win32_segments(DWORD start, in
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 <%u>\n", pid);
return;
}
}
@@ -674,7 +674,7 @@ void info_win32_virtual(DWORD pid)
type = "";
prot[0] = '\0';
}
- dbg_printf("%08lx %08lx %s %s %s\n",
+ dbg_printf("%08x %08lx %s %s %s\n",
(DWORD)addr, (DWORD)addr + mbi.RegionSize - 1, state, type, prot);
if (addr + mbi.RegionSize < addr) /* wrap around ? */
break;
diff --git a/programs/winedbg/memory.c b/programs/winedbg/memory.c
index cea30e9..9e68fbb 100644
--- a/programs/winedbg/memory.c
+++ b/programs/winedbg/memory.c
@@ -360,7 +360,7 @@ static void print_typed_basic(const stru
dbg_printf("'%c'", (char)val_int);
break;
default:
- WINE_FIXME("Unsupported basetype %lu\n", bt);
+ WINE_FIXME("Unsupported basetype %u\n", bt);
break;
}
break;
@@ -456,7 +456,7 @@ static void print_typed_basic(const stru
}
break;
default:
- WINE_FIXME("Unsupported tag %lu\n", tag);
+ WINE_FIXME("Unsupported tag %u\n", tag);
break;
}
}
@@ -570,7 +570,7 @@ void print_address(const ADDRESS64* addr
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);
@@ -634,6 +634,6 @@ BOOL memory_get_register(DWORD regno, DW
return TRUE;
}
}
- if (buffer) snprintf(buffer, len, "<unknown register %lu>", regno);
+ if (buffer) snprintf(buffer, len, "<unknown register %u>", regno);
return FALSE;
}
diff --git a/programs/winedbg/stack.c b/programs/winedbg/stack.c
index 8a6bbd6..68cb5a8 100644
--- a/programs/winedbg/stack.c
+++ b/programs/winedbg/stack.c
@@ -203,7 +203,7 @@ static BOOL WINAPI sym_enum_cb(SYMBOL_IN
DWORD addr = se->frame + sym_info->Address;
if (!dbg_read_memory((char*)addr, &val, sizeof(val)))
- snprintf(tmp, sizeof(tmp), "<*** cannot read at 0x%lx ***>", addr);
+ snprintf(tmp, sizeof(tmp), "<*** cannot read at 0x%x ***>", addr);
else
snprintf(tmp, sizeof(tmp), "0x%x", val);
}
@@ -212,7 +212,7 @@ static BOOL WINAPI sym_enum_cb(SYMBOL_IN
DWORD* pval;
if (memory_get_register(sym_info->Register, &pval, tmp, sizeof(tmp)))
- snprintf(tmp, sizeof(tmp), "0x%lx", *pval);
+ snprintf(tmp, sizeof(tmp), "0x%x", *pval);
}
sprintf(se->tmp + strlen(se->tmp), "%s=%s", sym_info->Name, tmp);
}
@@ -258,7 +258,7 @@ static void stack_print_addr_and_args(in
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)",
@@ -306,7 +306,7 @@ static void backtrace_tid(struct dbg_pro
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 (0x%x) in process (0x%x)\n", tid, pcs->pid);
else
{
CONTEXT saved_ctx = dbg_context;
@@ -318,7 +318,7 @@ static void backtrace_tid(struct dbg_pro
{
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 0x%x in current process\n",
tid);
}
else
@@ -328,7 +328,7 @@ static void backtrace_tid(struct dbg_pro
}
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 0x%x in current process\n", tid);
dbg_context = saved_ctx;
}
dbg_curr_thread = thread;
@@ -366,7 +366,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 0x%x\n",
entry.th32OwnerProcessID);
continue;
}
@@ -374,7 +374,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 0x%x in process 0x%x (%s):\n",
entry.th32ThreadID, dbg_curr_pid, dbg_curr_process->imageName);
backtrace_tid(dbg_curr_process, entry.th32ThreadID);
}
diff --git a/programs/winedbg/symbol.c b/programs/winedbg/symbol.c
index 23f59a6..d625706 100644
--- a/programs/winedbg/symbol.c
+++ b/programs/winedbg/symbol.c
@@ -438,7 +438,7 @@ enum dbg_line_status symbol_get_function
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;
}
@@ -550,13 +550,13 @@ static BOOL CALLBACK info_locals_cb(SYMB
if (!dbg_read_memory((void*)v, &val, sizeof(val)))
{
- dbg_printf(" %s (%s) *** cannot read at 0x%08lx\n",
+ dbg_printf(" %s (%s) *** cannot read at 0x%08x\n",
sym->Name, (sym->Flags & SYMFLAG_PARAMETER) ? "parameter" : "local",
v);
return TRUE;
}
}
- dbg_printf(" %s = 0x%8.8lx (%s%s)\n", sym->Name, val,
+ dbg_printf(" %s = 0x%8.8x (%s%s)\n", sym->Name, val,
(sym->Flags & SYMFLAG_PARAMETER) ? "parameter" : "local", buf);
return TRUE;
diff --git a/programs/winedbg/tgt_active.c b/programs/winedbg/tgt_active.c
index d87f4c2..49c6a0c 100644
--- a/programs/winedbg/tgt_active.c
+++ b/programs/winedbg/tgt_active.c
@@ -76,7 +76,7 @@ BOOL dbg_attach_debuggee(DWORD pid, BOOL
if (!DebugActiveProcess(pid))
{
- dbg_printf("Can't attach process %lx: error %ld\n", pid, GetLastError());
+ dbg_printf("Can't attach process %x: error %d\n", pid, GetLastError());
dbg_del_process(dbg_curr_process);
return FALSE;
}
@@ -202,7 +202,7 @@ static unsigned dbg_exception_prolog(BOO
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:%d\n", last_name, last_file, il.LineNumber);
}
}
}
@@ -240,7 +240,7 @@ static DWORD dbg_handle_exception(const
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)
@@ -257,11 +257,11 @@ static DWORD dbg_handle_exception(const
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=0x%x 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=0x%x renamed using MS VC6 extension (name==\"%s\")\n",
pThread->tid, pThread->name);
return DBG_CONTINUE;
}
@@ -381,7 +381,7 @@ static DWORD dbg_handle_exception(const
dbg_printf("floating point stack check");
break;
default:
- dbg_printf("0x%08lx", rec->ExceptionCode);
+ dbg_printf("0x%08x", rec->ExceptionCode);
break;
}
}
@@ -422,7 +422,7 @@ static void fetch_module_name(void* name
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);
@@ -447,12 +447,12 @@ static unsigned dbg_handle_debug_event(D
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("%08x:%08x: 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("%08x:%08x: exception code=%08x\n",
de->dwProcessId, de->dwThreadId,
de->u.Exception.ExceptionRecord.ExceptionCode);
@@ -485,10 +485,10 @@ static unsigned dbg_handle_debug_event(D
de->u.CreateProcessInfo.lpBaseOfImage,
buffer, sizeof(buffer), TRUE);
- WINE_TRACE("%08lx:%08lx: create process '%s'/%p @%08lx (%ld<%ld>)\n",
+ WINE_TRACE("%08x:%08x: create process '%s'/%p @%p (%d<%d>)\n",
de->dwProcessId, de->dwThreadId,
buffer, de->u.CreateProcessInfo.lpImageName,
- (unsigned long)(void*)de->u.CreateProcessInfo.lpStartAddress,
+ (void*)de->u.CreateProcessInfo.lpStartAddress,
de->u.CreateProcessInfo.dwDebugInfoFileOffset,
de->u.CreateProcessInfo.nDebugInfoSize);
dbg_set_process_name(dbg_curr_process, buffer);
@@ -497,11 +497,11 @@ static unsigned dbg_handle_debug_event(D
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 (%x)\n", GetLastError());
- WINE_TRACE("%08lx:%08lx: create thread I @%08lx\n",
+ WINE_TRACE("%08x:%08x: create thread I @%p\n",
de->dwProcessId, de->dwThreadId,
- (unsigned long)(void*)de->u.CreateProcessInfo.lpStartAddress);
+ (void*)de->u.CreateProcessInfo.lpStartAddress);
dbg_curr_thread = dbg_add_thread(dbg_curr_process,
de->dwThreadId,
@@ -517,7 +517,7 @@ static unsigned dbg_handle_debug_event(D
break;
case EXIT_PROCESS_DEBUG_EVENT:
- WINE_TRACE("%08lx:%08lx: exit process (%ld)\n",
+ WINE_TRACE("%08x:%08x: exit process (%d)\n",
de->dwProcessId, de->dwThreadId, de->u.ExitProcess.dwExitCode);
if (dbg_curr_process == NULL)
@@ -526,13 +526,13 @@ static unsigned dbg_handle_debug_event(D
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=0x%08x has terminated\n", de->dwProcessId);
break;
case CREATE_THREAD_DEBUG_EVENT:
- WINE_TRACE("%08lx:%08lx: create thread D @%08lx\n",
+ WINE_TRACE("%08x:%08x: create thread D @%p\n",
de->dwProcessId, de->dwThreadId,
- (unsigned long)(void*)de->u.CreateThread.lpStartAddress);
+ (void*)de->u.CreateThread.lpStartAddress);
if (dbg_curr_process == NULL)
{
@@ -558,7 +558,7 @@ static unsigned dbg_handle_debug_event(D
break;
case EXIT_THREAD_DEBUG_EVENT:
- WINE_TRACE("%08lx:%08lx: exit thread (%ld)\n",
+ WINE_TRACE("%08x:%08x: exit thread (%d)\n",
de->dwProcessId, de->dwThreadId, de->u.ExitThread.dwExitCode);
if (dbg_curr_thread == NULL)
@@ -581,9 +581,9 @@ static unsigned dbg_handle_debug_event(D
de->u.LoadDll.lpBaseOfDll,
buffer, sizeof(buffer), FALSE);
- WINE_TRACE("%08lx:%08lx: loads DLL %s @%08lx (%ld<%ld>)\n",
+ WINE_TRACE("%08x:%08x: loads DLL %s @%p (%d<%d>)\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,
@@ -593,16 +593,16 @@ static unsigned dbg_handle_debug_event(D
break_set_xpoints(TRUE);
if (DBG_IVAR(BreakOnDllLoad))
{
- dbg_printf("Stopping on DLL %s loading at 0x%08lx\n",
- buffer, (unsigned long)de->u.LoadDll.lpBaseOfDll);
+ dbg_printf("Stopping on DLL %s loading at 0x%p\n",
+ buffer, de->u.LoadDll.lpBaseOfDll);
if (dbg_fetch_context()) cont = 0;
}
break;
case UNLOAD_DLL_DEBUG_EVENT:
- WINE_TRACE("%08lx:%08lx: unload DLL @%08lx\n",
+ WINE_TRACE("%08x:%08x: 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);
@@ -618,18 +618,18 @@ static unsigned dbg_handle_debug_event(D
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("%08x:%08x: 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("%08x:%08x: rip error=%d type=%d\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("%08x:%08x: unknown event (%d)\n",
de->dwProcessId, de->dwThreadId, de->dwDebugEventCode);
}
if (!cont) return TRUE; /* stop execution */
@@ -653,12 +653,12 @@ static void dbg_resume_debuggee(DWORD co
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 %u\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 %u (%u)\n", dbg_curr_tid, cont);
}
static void wait_exception(void)
@@ -804,7 +804,7 @@ enum dbg_start dbg_active_attach(int ar
}
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);
diff --git a/programs/winedbg/tgt_minidump.c b/programs/winedbg/tgt_minidump.c
index 274c138..ca5b586 100644
--- a/programs/winedbg/tgt_minidump.c
+++ b/programs/winedbg/tgt_minidump.c
@@ -85,7 +85,7 @@ static inline struct tgt_process_minidum
}
static BOOL WINAPI tgt_process_minidump_read(HANDLE hProcess, const void* addr,
- void* buffer, DWORD len, DWORD* rlen)
+ void* buffer, SIZE_T len, SIZE_T* rlen)
{
ULONG size;
MINIDUMP_DIRECTORY* dir;
@@ -127,7 +127,7 @@ static BOOL WINAPI tgt_process_minidump_
}
static BOOL WINAPI tgt_process_minidump_write(HANDLE hProcess, void* addr,
- const void* buffer, DWORD len, DWORD* wlen)
+ const void* buffer, SIZE_T len, SIZE_T* wlen)
{
return FALSE;
}
@@ -193,7 +193,7 @@ static enum dbg_start minidump_do_reload
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 %u\n", pid);
switch (msi->ProcessorArchitecture)
{
case PROCESSOR_ARCHITECTURE_UNKNOWN:
@@ -271,7 +271,7 @@ static enum dbg_start minidump_do_reload
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 */
}
diff --git a/programs/winedbg/types.c b/programs/winedbg/types.c
index 0268978..d5c09de 100644
--- a/programs/winedbg/types.c
+++ b/programs/winedbg/types.c
@@ -119,7 +119,7 @@ long int types_extract_as_integer(const
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;
}
@@ -538,7 +538,7 @@ void print_value(const struct dbg_lvalue
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;
}
@@ -553,7 +553,7 @@ static BOOL CALLBACK print_types_cb(PSYM
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;
@@ -610,7 +610,7 @@ int types_print_type(const struct dbg_ty
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))
@@ -697,7 +697,7 @@ int types_print_type(const struct dbg_ty
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;
}
@@ -743,7 +743,7 @@ BOOL types_get_info(const struct dbg_typ
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 %d\n", bt); return FALSE;
}
X(WCHAR*) = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(name) + 1) * sizeof(WCHAR));
if (X(WCHAR*))
diff --git a/programs/winedbg/winedbg.c b/programs/winedbg/winedbg.c
index d206d3b..ff2717b 100644
--- a/programs/winedbg/winedbg.c
+++ b/programs/winedbg/winedbg.c
@@ -268,7 +268,7 @@ struct dbg_process* dbg_add_process(cons
{
if (p->handle != 0)
{
- WINE_ERR("Process (%lu) is already defined\n", pid);
+ WINE_ERR("Process (%u) is already defined\n", pid);
}
else
{
@@ -401,7 +401,7 @@ struct dbg_thread* dbg_add_thread(struct
t->curr_frame = -1;
t->addr_mode = AddrModeFlat;
- snprintf(t->name, sizeof(t->name), "0x%08lx", tid);
+ snprintf(t->name, sizeof(t->name), "0x%08x", tid);
t->next = p->threads;
t->prev = NULL;
@@ -547,7 +547,7 @@ #endif
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 @@ #endif
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 @@ #endif
if (dbg_curr_process)
{
- dbg_printf("WineDbg starting on pid 0x%lx\n", dbg_curr_pid);
+ dbg_printf("WineDbg starting on pid 0x%x\n", dbg_curr_pid);
if (dbg_curr_process->active_debuggee) dbg_active_wait_for_first_exception();
}
--
1.4.1.1
More information about the wine-patches
mailing list