mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 14:24:45 +00:00
dbghelp: Always ensure that 64bit module functions use real 64bit addresses.
This commit is contained in:
parent
0c870edd05
commit
82d961e382
2 changed files with 5 additions and 5 deletions
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue