From 2bc33389e8969856555b15358db55416eb939b7c Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 20 Dec 2006 14:10:47 +0100 Subject: [PATCH] winedbg: Fixed a few data types. --- programs/winedbg/be_i386.c | 6 +++--- programs/winedbg/debugger.h | 4 ++-- programs/winedbg/gdbproxy.c | 8 ++++---- programs/winedbg/info.c | 4 ++-- programs/winedbg/tgt_minidump.c | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/programs/winedbg/be_i386.c b/programs/winedbg/be_i386.c index f15121d272..31bcc96c3d 100644 --- a/programs/winedbg/be_i386.c +++ b/programs/winedbg/be_i386.c @@ -574,7 +574,7 @@ static unsigned be_i386_is_func_call(const void* insn, ADDRESS64* callee) #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)) { @@ -607,7 +607,7 @@ static unsigned be_i386_insert_Xpoint(HANDLE hProcess, const struct be_process_i { unsigned char ch; SIZE_T sz; - unsigned long* pr; + DWORD *pr; int reg; unsigned long bits; @@ -630,7 +630,7 @@ static unsigned be_i386_insert_Xpoint(HANDLE hProcess, const struct be_process_i bits = DR7_RW_WRITE; hw_bp: if ((reg = be_i386_get_unused_DR(ctx, &pr)) == -1) return 0; - *pr = (unsigned long)addr; + *pr = (DWORD)addr; if (type != be_xpoint_watch_exec) switch (size) { case 4: bits |= DR7_LEN_4; break; diff --git a/programs/winedbg/debugger.h b/programs/winedbg/debugger.h index 6e4c010f26..91d5a78c16 100644 --- a/programs/winedbg/debugger.h +++ b/programs/winedbg/debugger.h @@ -132,7 +132,7 @@ struct dbg_breakpoint xpoint_type : 2, refcount : 13, skipcount : 16; - DWORD info; + unsigned long info; struct /* only used for watchpoints */ { BYTE len : 2; @@ -325,7 +325,7 @@ extern int expr_print(const struct expr* exp); /* info.c */ extern void print_help(void); extern void info_help(void); -extern void info_win32_module(DWORD mod); +extern void info_win32_module(DWORD64 mod); extern void info_win32_class(HWND hWnd, const char* clsName); extern void info_win32_window(HWND hWnd, BOOL detailed); extern void info_win32_processes(void); diff --git a/programs/winedbg/gdbproxy.c b/programs/winedbg/gdbproxy.c index bb808c2297..0b497a0031 100644 --- a/programs/winedbg/gdbproxy.c +++ b/programs/winedbg/gdbproxy.c @@ -609,7 +609,7 @@ static void handle_debug_event(struct gdb_context* gdbctx, DEBUG_EVENT* de) } } -static void resume_debuggee(struct gdb_context* gdbctx, unsigned long cont) +static void resume_debuggee(struct gdb_context* gdbctx, DWORD cont) { if (dbg_curr_thread) { @@ -626,7 +626,7 @@ static void resume_debuggee(struct gdb_context* gdbctx, unsigned long cont) } -static void resume_debuggee_thread(struct gdb_context* gdbctx, unsigned long cont, unsigned int threadid) +static void resume_debuggee_thread(struct gdb_context* gdbctx, DWORD cont, unsigned int threadid) { if (dbg_curr_thread) @@ -725,7 +725,7 @@ static void detach_debuggee(struct gdb_context* gdbctx, BOOL kill) 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)) { @@ -760,7 +760,7 @@ static void get_thread_info(struct gdb_context* gdbctx, unsigned tid, char* buffer, size_t len) { struct dbg_thread* thd; - unsigned long status; + DWORD status; int prio; /* FIXME: use the size of buffer */ diff --git a/programs/winedbg/info.c b/programs/winedbg/info.c index c5b7b1ee3a..0db9d23029 100644 --- a/programs/winedbg/info.c +++ b/programs/winedbg/info.c @@ -198,7 +198,7 @@ static BOOL CALLBACK info_mod_cb(PSTR mod_name, DWORD64 base, void* ctx) * * Display information about a given module (DLL or EXE), or about all modules */ -void info_win32_module(DWORD base) +void info_win32_module(DWORD64 base) { struct info_module im; int i, j, num_printed = 0; @@ -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%lx%08lx' is not a valid module address\n", (DWORD)(base >> 32), (DWORD)base); } struct class_walker diff --git a/programs/winedbg/tgt_minidump.c b/programs/winedbg/tgt_minidump.c index 274c13868f..3e68080a89 100644 --- a/programs/winedbg/tgt_minidump.c +++ b/programs/winedbg/tgt_minidump.c @@ -85,7 +85,7 @@ static inline struct tgt_process_minidump_data* PRIVATE(struct dbg_process* pcs) } 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_read(HANDLE hProcess, const void* addr, } 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; } -- 2.32.0.93.g670b81a890