Commit 25cdb4c2 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Fixed regressions introduced when moving addresses as 64bit values.

parent 1b8a8b26
......@@ -369,7 +369,7 @@ static int elf_new_wine_thunks(struct module* module, struct hash_table* ht_symt
}
else
{
DWORD ref_addr;
ULONG64 ref_addr;
idx = symt_find_nearest(module, addr);
if (idx != -1)
......@@ -403,7 +403,8 @@ static int elf_new_wine_thunks(struct module* module, struct hash_table* ht_symt
}
else if (strcmp(ste->ht_elt.name, module->addr_sorttab[idx]->hash_elt.name))
{
DWORD xaddr = 0, xsize = 0, kind = -1;
ULONG64 xaddr = 0;
DWORD xsize = 0, kind = -1;
symt_get_info(&module->addr_sorttab[idx]->symt, TI_GET_ADDRESS, &xaddr);
symt_get_info(&module->addr_sorttab[idx]->symt, TI_GET_LENGTH, &xsize);
......@@ -416,10 +417,11 @@ static int elf_new_wine_thunks(struct module* module, struct hash_table* ht_symt
*/
if ((xsize || ste->symp->st_size) &&
(kind == (ELF32_ST_BIND(ste->symp->st_info) == STB_LOCAL) ? DataIsFileStatic : DataIsGlobal))
FIXME("Duplicate in %s: %s<%08lx-%08x> %s<%08lx-%08lx>\n",
FIXME("Duplicate in %s: %s<%08lx-%08x> %s<%s-%08lx>\n",
module->module.ModuleName,
ste->ht_elt.name, addr, ste->symp->st_size,
module->addr_sorttab[idx]->hash_elt.name, xaddr, xsize);
module->addr_sorttab[idx]->hash_elt.name,
wine_dbgstr_longlong(xaddr), xsize);
}
}
}
......
......@@ -53,16 +53,16 @@ struct line_info
} u;
};
inline static int cmp_addr(DWORD a1, DWORD a2)
inline static int cmp_addr(ULONG64 a1, ULONG64 a2)
{
if (a1 > a2) return 1;
if (a1 < a2) return -1;
return 0;
}
inline static int cmp_sorttab_addr(const struct module* module, int idx, DWORD addr)
inline static int cmp_sorttab_addr(const struct module* module, int idx, ULONG64 addr)
{
DWORD ref;
ULONG64 ref;
symt_get_info(&module->addr_sorttab[idx]->symt, TI_GET_ADDRESS, &ref);
return cmp_addr(ref, addr);
......@@ -72,7 +72,7 @@ int symt_cmp_addr(const void* p1, const void* p2)
{
const struct symt* sym1 = *(const struct symt* const *)p1;
const struct symt* sym2 = *(const struct symt* const *)p2;
DWORD a1, a2;
ULONG64 a1, a2;
symt_get_info(sym1, TI_GET_ADDRESS, &a1);
symt_get_info(sym2, TI_GET_ADDRESS, &a2);
......@@ -614,7 +614,8 @@ static BOOL resort_symbols(struct module* module)
int symt_find_nearest(struct module* module, DWORD addr)
{
int mid, high, low;
DWORD ref_addr, ref_size;
ULONG64 ref_addr;
DWORD ref_size;
if (!module->sortlist_valid || !module->addr_sorttab)
{
......
......@@ -459,25 +459,25 @@ BOOL symt_get_info(const struct symt* type, IMAGEHLP_SYMBOL_TYPE_INFO req,
{
case DataIsGlobal:
case DataIsFileStatic:
X(DWORD) = ((const struct symt_data*)type)->u.address;
X(ULONG64) = ((const struct symt_data*)type)->u.address;
break;
default: return FALSE;
}
break;
case SymTagFunction:
X(DWORD) = ((const struct symt_function*)type)->address;
X(ULONG64) = ((const struct symt_function*)type)->address;
break;
case SymTagPublicSymbol:
X(DWORD) = ((const struct symt_public*)type)->address;
X(ULONG64) = ((const struct symt_public*)type)->address;
break;
case SymTagFuncDebugStart:
case SymTagFuncDebugEnd:
case SymTagLabel:
X(DWORD) = ((const struct symt_function_point*)type)->parent->address +
X(ULONG64) = ((const struct symt_function_point*)type)->parent->address +
((const struct symt_function_point*)type)->offset;
break;
case SymTagThunk:
X(DWORD) = ((const struct symt_thunk*)type)->address;
X(ULONG64) = ((const struct symt_thunk*)type)->address;
break;
default:
FIXME("Unsupported sym-tag %s for get-address\n",
......
......@@ -32,7 +32,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(winedbg);
static BOOL symbol_get_debug_start(DWORD mod_base, DWORD typeid, DWORD* start)
static BOOL symbol_get_debug_start(DWORD mod_base, DWORD typeid, ULONG64* start)
{
DWORD count, tag;
char buffer[sizeof(TI_FINDCHILDREN_PARAMS) + 256 * sizeof(DWORD)];
......@@ -85,7 +85,7 @@ struct sgv_data
static BOOL CALLBACK sgv_cb(SYMBOL_INFO* sym, ULONG size, void* ctx)
{
struct sgv_data* sgv = (struct sgv_data*)ctx;
DWORD addr;
ULONG64 addr;
IMAGEHLP_LINE il;
unsigned cookie = DLV_TARGET, insp;
......@@ -106,7 +106,7 @@ static BOOL CALLBACK sgv_cb(SYMBOL_INFO* sym, ULONG size, void* ctx)
sym->Name, sym->Register);
return TRUE;
}
addr = (DWORD)div->pval;
addr = (ULONG64)(DWORD_PTR)div->pval;
cookie = DLV_HOST;
}
else if (sym->Flags & SYMFLAG_FRAMEREL)
......@@ -424,7 +424,8 @@ void symbol_read_symtable(const char* filename, unsigned long offset)
enum dbg_line_status symbol_get_function_line_status(const ADDRESS* addr)
{
IMAGEHLP_LINE il;
DWORD disp, start, size;
DWORD disp, size;
ULONG64 start;
DWORD lin = (DWORD)memory_to_linear_addr(addr);
char buffer[sizeof(SYMBOL_INFO) + 256];
SYMBOL_INFO* sym = (SYMBOL_INFO*)buffer;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment