Eric Pouech : dbghelp: Always ensure that 64bit module functions use real 64bit addresses.
Alexandre Julliard
julliard at winehq.org
Mon Jan 23 13:00:58 CST 2012
Module: wine
Branch: master
Commit: 82d961e382d62c72d610e14ebdf7c2e3ecca5c47
URL: http://source.winehq.org/git/wine.git/?a=commit;h=82d961e382d62c72d610e14ebdf7c2e3ecca5c47
Author: Eric Pouech <eric.pouech at orange.fr>
Date: Sun Jan 22 13:00:57 2012 +0100
dbghelp: Always ensure that 64bit module functions use real 64bit addresses.
---
dlls/dbghelp/dbghelp_private.h | 2 +-
dlls/dbghelp/module.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h
index 0e2aae7..7f5eb3b 100644
--- a/dlls/dbghelp/dbghelp_private.h
+++ b/dlls/dbghelp/dbghelp_private.h
@@ -535,7 +535,7 @@ extern const WCHAR S_WineLoaderW[] DECLSPEC_HIDDEN;
extern const WCHAR S_SlashW[] DECLSPEC_HIDDEN;
extern struct module*
- module_find_by_addr(const struct process* pcs, unsigned long addr,
+ module_find_by_addr(const struct process* pcs, DWORD64 addr,
enum module_type type) DECLSPEC_HIDDEN;
extern struct module*
module_find_by_nameW(const struct process* pcs,
diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c
index 2a1471f..2436a0f 100644
--- a/dlls/dbghelp/module.c
+++ b/dlls/dbghelp/module.c
@@ -388,7 +388,7 @@ BOOL module_get_debug(struct module_pair* pair)
* either the addr where module is loaded, or any address inside the
* module
*/
-struct module* module_find_by_addr(const struct process* pcs, unsigned long addr,
+struct module* module_find_by_addr(const struct process* pcs, DWORD64 addr,
enum module_type type)
{
struct module* module;
@@ -659,8 +659,8 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam
DWORD64 WINAPI SymLoadModule64(HANDLE hProcess, HANDLE hFile, PCSTR ImageName,
PCSTR ModuleName, DWORD64 BaseOfDll, DWORD SizeOfDll)
{
- if (!validate_addr64(BaseOfDll)) return FALSE;
- return SymLoadModule(hProcess, hFile, ImageName, ModuleName, (DWORD)BaseOfDll, SizeOfDll);
+ return SymLoadModuleEx(hProcess, hFile, ImageName, ModuleName, BaseOfDll, SizeOfDll,
+ NULL, 0);
}
/******************************************************************
@@ -730,7 +730,7 @@ BOOL WINAPI SymUnloadModule64(HANDLE hProcess, DWORD64 BaseOfDll)
pcs = process_find_by_handle(hProcess);
if (!pcs) return FALSE;
if (!validate_addr64(BaseOfDll)) return FALSE;
- module = module_find_by_addr(pcs, (DWORD)BaseOfDll, DMT_UNKNOWN);
+ module = module_find_by_addr(pcs, BaseOfDll, DMT_UNKNOWN);
if (!module) return FALSE;
return module_remove(pcs, module);
}
More information about the wine-cvs
mailing list