Module: wine Branch: master Commit: 7daa50c0417186eb327d1984d8977641a10954ea URL: http://source.winehq.org/git/wine.git/?a=commit;h=7daa50c0417186eb327d1984d8...
Author: Eric Pouech eric.pouech@orange.fr Date: Sat Dec 12 12:19:14 2009 +0100
winedbg: Ensure all addresses passed to break functions are 64bit wide.
---
programs/winedbg/break.c | 8 ++++---- programs/winedbg/debugger.h | 2 +- programs/winedbg/tgt_active.c | 5 ++--- 3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/programs/winedbg/break.c b/programs/winedbg/break.c index accf17b..c76a868 100644 --- a/programs/winedbg/break.c +++ b/programs/winedbg/break.c @@ -484,9 +484,9 @@ static inline BOOL module_is_container(const IMAGEHLP_MODULE* wmod_cntnr, * * Remove all Xpoints from module which base is 'base' */ -void break_delete_xpoints_from_module(unsigned long base) +void break_delete_xpoints_from_module(DWORD64 base) { - IMAGEHLP_MODULE im, im_elf; + IMAGEHLP_MODULE64 im, im_elf; int i; DWORD_PTR linear; struct dbg_breakpoint* bp = dbg_curr_process->bp; @@ -494,10 +494,10 @@ void break_delete_xpoints_from_module(unsigned long base) /* FIXME: should do it also on the ELF sibbling if any */ im.SizeOfStruct = sizeof(im); im_elf.SizeOfStruct = sizeof(im_elf); - if (!SymGetModuleInfo(dbg_curr_process->handle, base, &im)) return; + if (!SymGetModuleInfo64(dbg_curr_process->handle, base, &im)) return;
/* try to get in fact the underlying ELF module (if any) */ - if (SymGetModuleInfo(dbg_curr_process->handle, im.BaseOfImage - 1, &im_elf) && + if (SymGetModuleInfo64(dbg_curr_process->handle, im.BaseOfImage - 1, &im_elf) && im_elf.BaseOfImage <= im.BaseOfImage && im_elf.BaseOfImage + im_elf.ImageSize >= im.BaseOfImage + im.ImageSize) im = im_elf; diff --git a/programs/winedbg/debugger.h b/programs/winedbg/debugger.h index 61325e3..42f9b24 100644 --- a/programs/winedbg/debugger.h +++ b/programs/winedbg/debugger.h @@ -291,7 +291,7 @@ extern void break_add_watch_from_lvalue(const struct dbg_lvalue* lva extern void break_add_watch_from_id(const char* name); extern void break_check_delayed_bp(void); extern void break_delete_xpoint(int num); -extern void break_delete_xpoints_from_module(unsigned long base); +extern void break_delete_xpoints_from_module(DWORD64 base); extern void break_enable_xpoint(int num, BOOL enable); extern void break_info(void); extern void break_adjust_pc(ADDRESS64* addr, DWORD code, BOOL first_chance, BOOL* is_break); diff --git a/programs/winedbg/tgt_active.c b/programs/winedbg/tgt_active.c index 23917e0..a25fbd4 100644 --- a/programs/winedbg/tgt_active.c +++ b/programs/winedbg/tgt_active.c @@ -626,9 +626,8 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de) WINE_TRACE("%04x:%04x: unload DLL @%p\n", de->dwProcessId, de->dwThreadId, 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); + break_delete_xpoints_from_module((DWORD_PTR)de->u.UnloadDll.lpBaseOfDll); + SymUnloadModule64(dbg_curr_process->handle, (DWORD_PTR)de->u.UnloadDll.lpBaseOfDll); break;
case OUTPUT_DEBUG_STRING_EVENT: