winedbg: Ensure all addresses passed to break functions are 64bit wide.

This commit is contained in:
Eric Pouech 2009-12-12 12:19:14 +01:00 committed by Alexandre Julliard
parent 485280c64b
commit 7daa50c041
3 changed files with 7 additions and 8 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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: