dbghelp: Always set the size to public symbols to 1 when we don't know the size
so that they can only be search on their start address
This commit is contained in:
parent
467ba4d398
commit
c9de37d71c
|
@ -1206,7 +1206,7 @@ static int codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* root
|
|||
symt_new_public(msc_dbg->module, flt ? flt->compiland : NULL,
|
||||
terminate_string(&sym->data_v1.p_name),
|
||||
codeview_get_address(msc_dbg, sym->data_v1.segment, sym->data_v1.offset),
|
||||
0, TRUE /* FIXME */, TRUE /* FIXME */);
|
||||
1, TRUE /* FIXME */, TRUE /* FIXME */);
|
||||
}
|
||||
break;
|
||||
case S_PUB_V2: /* FIXME is this really a 'data_v2' structure ?? */
|
||||
|
@ -1216,7 +1216,7 @@ static int codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* root
|
|||
symt_new_public(msc_dbg->module, flt ? flt->compiland : NULL,
|
||||
terminate_string(&sym->data_v2.p_name),
|
||||
codeview_get_address(msc_dbg, sym->data_v2.segment, sym->data_v2.offset),
|
||||
0, TRUE /* FIXME */, TRUE /* FIXME */);
|
||||
1, TRUE /* FIXME */, TRUE /* FIXME */);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1515,7 +1515,7 @@ static int codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* root
|
|||
flt ? flt->compiland : NULL,
|
||||
sym->data_v3.name,
|
||||
codeview_get_address(msc_dbg, sym->data_v3.segment, sym->data_v3.offset),
|
||||
0, FALSE /* FIXME */, FALSE);
|
||||
1, FALSE /* FIXME */, FALSE);
|
||||
}
|
||||
break;
|
||||
case S_PUB_FUNC1_V3:
|
||||
|
@ -1527,7 +1527,7 @@ static int codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* root
|
|||
flt ? flt->compiland : NULL,
|
||||
sym->data_v3.name,
|
||||
codeview_get_address(msc_dbg, sym->data_v3.segment, sym->data_v3.offset),
|
||||
0, TRUE /* FIXME */, TRUE);
|
||||
1, TRUE /* FIXME */, TRUE);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -214,13 +214,13 @@ static BOOL pe_load_export_debug_info(const struct process* pcs,
|
|||
#if 0
|
||||
/* Add start of DLL (better use the (yet unimplemented) Exe SymTag for this) */
|
||||
/* FIXME: module.ModuleName isn't correctly set yet if it's passed in SymLoadModule */
|
||||
symt_new_public(module, NULL, module->module.ModuleName, base, 0,
|
||||
symt_new_public(module, NULL, module->module.ModuleName, base, 1,
|
||||
TRUE /* FIXME */, TRUE /* FIXME */);
|
||||
#endif
|
||||
|
||||
/* Add entry point */
|
||||
symt_new_public(module, NULL, "EntryPoint",
|
||||
base + nth->OptionalHeader.AddressOfEntryPoint, 0,
|
||||
base + nth->OptionalHeader.AddressOfEntryPoint, 1,
|
||||
TRUE, TRUE);
|
||||
#if 0
|
||||
/* FIXME: we'd better store addresses linked to sections rather than
|
||||
|
@ -233,7 +233,7 @@ static BOOL pe_load_export_debug_info(const struct process* pcs,
|
|||
{
|
||||
symt_new_public(module, NULL, section->Name,
|
||||
RtlImageRvaToVa(nth, (void*)mapping, section->VirtualAddress, NULL),
|
||||
0, TRUE /* FIXME */, TRUE /* FIXME */);
|
||||
1, TRUE /* FIXME */, TRUE /* FIXME */);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -257,7 +257,7 @@ static BOOL pe_load_export_debug_info(const struct process* pcs,
|
|||
symt_new_public(module, NULL,
|
||||
RtlImageRvaToVa(nth, (void*)mapping, names[i], NULL),
|
||||
base + functions[ordinals[i]],
|
||||
0, TRUE /* FIXME */, TRUE /* FIXME */);
|
||||
1, TRUE /* FIXME */, TRUE /* FIXME */);
|
||||
}
|
||||
|
||||
for (i = 0; i < exports->NumberOfFunctions; i++)
|
||||
|
@ -268,7 +268,7 @@ static BOOL pe_load_export_debug_info(const struct process* pcs,
|
|||
if ((ordinals[j] == i) && names[j]) break;
|
||||
if (j < exports->NumberOfNames) continue;
|
||||
snprintf(buffer, sizeof(buffer), "%ld", i + exports->Base);
|
||||
symt_new_public(module, NULL, buffer, base + (DWORD)functions[i], 0,
|
||||
symt_new_public(module, NULL, buffer, base + (DWORD)functions[i], 1,
|
||||
TRUE /* FIXME */, TRUE /* FIXME */);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -639,7 +639,7 @@ int symt_find_nearest(struct module* module, DWORD addr)
|
|||
if (high)
|
||||
{
|
||||
symt_get_info(&module->addr_sorttab[high - 1]->symt, TI_GET_ADDRESS, &ref_addr);
|
||||
if (!symt_get_info(&module->addr_sorttab[high - 1]->symt, TI_GET_LENGTH, &ref_size) || !ref_size)
|
||||
if (!symt_get_info(&module->addr_sorttab[high - 1]->symt, TI_GET_LENGTH, &ref_size) || !ref_size)
|
||||
ref_size = 0x1000; /* arbitrary value */
|
||||
if (addr >= ref_addr + ref_size) return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue