dbghelp: Remove address field from symt_compiland.

It's mostly always set at 0, and native dbghelp doesn't expose it anyway.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
This commit is contained in:
Eric Pouech 2022-09-30 18:14:24 +02:00 committed by Alexandre Julliard
parent 1237ae4f9d
commit 99eb63bd7a
8 changed files with 10 additions and 19 deletions

View file

@ -114,8 +114,7 @@ static int coff_add_file(struct CoffFileSet* coff_files, struct module* module,
file = coff_files->files + coff_files->nfiles;
file->startaddr = 0xffffffff;
file->endaddr = 0;
file->compiland = symt_new_compiland(module, 0,
source_new(module, NULL, filename));
file->compiland = symt_new_compiland(module, source_new(module, NULL, filename));
file->linetab_offset = -1;
file->linecnt = 0;
file->entries = NULL;

View file

@ -815,8 +815,7 @@ extern struct symt_ht*
extern struct symt_module*
symt_new_module(struct module* module) DECLSPEC_HIDDEN;
extern struct symt_compiland*
symt_new_compiland(struct module* module, ULONG_PTR address,
unsigned src_idx) DECLSPEC_HIDDEN;
symt_new_compiland(struct module* module, unsigned src_idx) DECLSPEC_HIDDEN;
extern struct symt_public*
symt_new_public(struct module* module,
struct symt_compiland* parent,

View file

@ -2970,7 +2970,7 @@ static BOOL dwarf2_parse_compilation_unit(dwarf2_parse_context_t* ctx)
struct vector* children;
dwarf2_debug_info_t* child = NULL;
unsigned int i;
struct attribute stmt_list, low_pc;
struct attribute stmt_list;
struct attribute comp_dir;
struct attribute language;
@ -2981,15 +2981,12 @@ static BOOL dwarf2_parse_compilation_unit(dwarf2_parse_context_t* ctx)
if (!dwarf2_find_attribute(di, DW_AT_comp_dir, &comp_dir))
comp_dir.u.string = NULL;
if (!dwarf2_find_attribute(di, DW_AT_low_pc, &low_pc))
low_pc.u.uvalue = 0;
if (!dwarf2_find_attribute(di, DW_AT_language, &language))
language.u.uvalue = DW_LANG_C;
ctx->language = language.u.uvalue;
ctx->compiland = symt_new_compiland(ctx->module_ctx->module, ctx->module_ctx->load_offset + low_pc.u.uvalue,
ctx->compiland = symt_new_compiland(ctx->module_ctx->module,
source_new(ctx->module_ctx->module, comp_dir.u.string, name.u.string));
dwarf2_cache_cuhead(ctx->module_ctx->module->format_info[DFI_DWARF]->u.dwarf2_info, ctx->compiland, &ctx->head);
di->symt = &ctx->compiland->symt;

View file

@ -699,8 +699,7 @@ static void elf_hash_symtab(struct module* module, struct pool* pool,
{
case ELF_STT_FILE:
if (symname)
compiland = symt_new_compiland(module, sym.st_value,
source_new(module, NULL, symname));
compiland = symt_new_compiland(module, source_new(module, NULL, symname));
else
compiland = NULL;
continue;

View file

@ -2504,14 +2504,14 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg,
case S_OBJNAME:
TRACE("S-ObjName-V3 %s\n", sym->objname_v3.name);
compiland = symt_new_compiland(msc_dbg->module, 0 /* FIXME */,
compiland = symt_new_compiland(msc_dbg->module,
source_new(msc_dbg->module, NULL,
sym->objname_v3.name));
break;
case S_OBJNAME_ST:
TRACE("S-ObjName-V1 %s\n", terminate_string(&sym->objname_v1.p_name));
compiland = symt_new_compiland(msc_dbg->module, 0 /* FIXME */,
compiland = symt_new_compiland(msc_dbg->module,
source_new(msc_dbg->module, NULL,
terminate_string(&sym->objname_v1.p_name)));
break;

View file

@ -470,8 +470,7 @@ static BOOL pe_load_coff_symbol_table(struct module* module)
if (name[0] == '_') name++;
if (!compiland && lastfilename)
compiland = symt_new_compiland(module, 0,
source_new(module, NULL, lastfilename));
compiland = symt_new_compiland(module, source_new(module, NULL, lastfilename));
if (!(dbghelp_options & SYMOPT_NO_PUBLICS))
symt_new_public(module, compiland, name, FALSE,

View file

@ -1570,7 +1570,7 @@ BOOL stabs_parse(struct module* module, ULONG_PTR load_offset,
{
stabs_reset_includes();
source_idx = source_new(module, srcpath, ptr);
compiland = symt_new_compiland(module, 0 /* FIXME */, source_idx);
compiland = symt_new_compiland(module, source_idx);
}
else
{

View file

@ -228,8 +228,7 @@ struct symt_module* symt_new_module(struct module* module)
return sym;
}
struct symt_compiland* symt_new_compiland(struct module* module,
ULONG_PTR address, unsigned src_idx)
struct symt_compiland* symt_new_compiland(struct module* module, unsigned src_idx)
{
struct symt_compiland* sym;
struct symt_compiland** p;
@ -240,7 +239,6 @@ struct symt_compiland* symt_new_compiland(struct module* module,
{
sym->symt.tag = SymTagCompiland;
sym->container = module->top;
sym->address = address;
sym->source = src_idx;
vector_init(&sym->vchildren, sizeof(struct symt*), 32);
sym->user = NULL;