dbghelp: Enforce using 64bit integers for module's address and size.
This commit is contained in:
parent
9ff52fb82c
commit
c6eb8104dd
|
@ -473,7 +473,7 @@ extern BOOL module_get_debug(struct module_pair*);
|
||||||
extern struct module*
|
extern struct module*
|
||||||
module_new(struct process* pcs, const WCHAR* name,
|
module_new(struct process* pcs, const WCHAR* name,
|
||||||
enum module_type type, BOOL virtual,
|
enum module_type type, BOOL virtual,
|
||||||
unsigned long addr, unsigned long size,
|
DWORD64 addr, DWORD64 size,
|
||||||
unsigned long stamp, unsigned long checksum);
|
unsigned long stamp, unsigned long checksum);
|
||||||
extern struct module*
|
extern struct module*
|
||||||
module_get_containee(const struct process* pcs,
|
module_get_containee(const struct process* pcs,
|
||||||
|
@ -505,7 +505,7 @@ extern struct module*
|
||||||
HANDLE hFile, DWORD base, DWORD size);
|
HANDLE hFile, DWORD base, DWORD size);
|
||||||
extern struct module*
|
extern struct module*
|
||||||
pe_load_builtin_module(struct process* pcs, const WCHAR* name,
|
pe_load_builtin_module(struct process* pcs, const WCHAR* name,
|
||||||
DWORD base, DWORD size);
|
DWORD64 base, DWORD64 size);
|
||||||
extern BOOL pe_load_debug_info(const struct process* pcs,
|
extern BOOL pe_load_debug_info(const struct process* pcs,
|
||||||
struct module* module);
|
struct module* module);
|
||||||
/* source.c */
|
/* source.c */
|
||||||
|
|
|
@ -122,7 +122,7 @@ static const char* get_module_type(enum module_type type, BOOL virtual)
|
||||||
*/
|
*/
|
||||||
struct module* module_new(struct process* pcs, const WCHAR* name,
|
struct module* module_new(struct process* pcs, const WCHAR* name,
|
||||||
enum module_type type, BOOL virtual,
|
enum module_type type, BOOL virtual,
|
||||||
unsigned long mod_addr, unsigned long size,
|
DWORD64 mod_addr, DWORD64 size,
|
||||||
unsigned long stamp, unsigned long checksum)
|
unsigned long stamp, unsigned long checksum)
|
||||||
{
|
{
|
||||||
struct module* module;
|
struct module* module;
|
||||||
|
@ -134,8 +134,9 @@ struct module* module_new(struct process* pcs, const WCHAR* name,
|
||||||
module->next = pcs->lmodules;
|
module->next = pcs->lmodules;
|
||||||
pcs->lmodules = module;
|
pcs->lmodules = module;
|
||||||
|
|
||||||
TRACE("=> %s %08lx-%08lx %s\n",
|
TRACE("=> %s %s-%s %s\n",
|
||||||
get_module_type(type, virtual), mod_addr, mod_addr + size,
|
get_module_type(type, virtual),
|
||||||
|
wine_dbgstr_longlong(mod_addr), wine_dbgstr_longlong(mod_addr + size),
|
||||||
debugstr_w(name));
|
debugstr_w(name));
|
||||||
|
|
||||||
pool_init(&module->pool, 65536);
|
pool_init(&module->pool, 65536);
|
||||||
|
@ -373,7 +374,7 @@ struct module* module_find_by_addr(const struct process* pcs, unsigned long addr
|
||||||
* already loaded
|
* already loaded
|
||||||
*/
|
*/
|
||||||
static BOOL module_is_container_loaded(const struct process* pcs,
|
static BOOL module_is_container_loaded(const struct process* pcs,
|
||||||
const WCHAR* ImageName, DWORD base)
|
const WCHAR* ImageName, DWORD64 base)
|
||||||
{
|
{
|
||||||
size_t len;
|
size_t len;
|
||||||
struct module* module;
|
struct module* module;
|
||||||
|
@ -536,7 +537,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam
|
||||||
{
|
{
|
||||||
if (!wImageName) return FALSE;
|
if (!wImageName) return FALSE;
|
||||||
module = module_new(pcs, wImageName, module_get_type_by_name(wImageName),
|
module = module_new(pcs, wImageName, module_get_type_by_name(wImageName),
|
||||||
TRUE, (DWORD)BaseOfDll, SizeOfDll, 0, 0);
|
TRUE, BaseOfDll, SizeOfDll, 0, 0);
|
||||||
if (!module) return FALSE;
|
if (!module) return FALSE;
|
||||||
if (wModuleName) module_set_module(module, wModuleName);
|
if (wModuleName) module_set_module(module, wModuleName);
|
||||||
module->module.SymType = SymVirtual;
|
module->module.SymType = SymVirtual;
|
||||||
|
|
|
@ -448,7 +448,7 @@ BOOL pe_load_nt_header(HANDLE hProc, DWORD64 base, IMAGE_NT_HEADERS* nth)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
struct module* pe_load_builtin_module(struct process* pcs, const WCHAR* name,
|
struct module* pe_load_builtin_module(struct process* pcs, const WCHAR* name,
|
||||||
DWORD base, DWORD size)
|
DWORD64 base, DWORD64 size)
|
||||||
{
|
{
|
||||||
struct module* module = NULL;
|
struct module* module = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue