dbghelp: Return the stored name for a compiland.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Eric Pouech 2021-08-30 09:24:35 +02:00 committed by Alexandre Julliard
parent 1fa1620086
commit 2325962e74
3 changed files with 7 additions and 3 deletions

View File

@ -170,6 +170,7 @@ struct symt_module /* in fact any of .exe, .dll... */
struct symt_compiland
{
struct symt symt;
struct symt_module* container; /* symt_module */
ULONG_PTR address;
unsigned source;
struct vector vchildren; /* global variables & functions */

View File

@ -205,9 +205,10 @@ struct symt_compiland* symt_new_compiland(struct module* module,
debugstr_w(module->module.ModuleName), source_get(module, src_idx));
if ((sym = pool_alloc(&module->pool, sizeof(*sym))))
{
sym->symt.tag = SymTagCompiland;
sym->address = address;
sym->source = src_idx;
sym->symt.tag = SymTagCompiland;
sym->container = module->top;
sym->address = address;
sym->source = src_idx;
vector_init(&sym->vchildren, sizeof(struct symt*), 32);
}
return sym;

View File

@ -91,6 +91,8 @@ const char* symt_get_name(const struct symt* sym)
case SymTagEnum: return ((const struct symt_enum*)sym)->name;
case SymTagTypedef: return ((const struct symt_typedef*)sym)->hash_elt.name;
case SymTagUDT: return ((const struct symt_udt*)sym)->hash_elt.name;
case SymTagCompiland: return source_get(((const struct symt_compiland*)sym)->container->module,
((const struct symt_compiland*)sym)->source);
default:
FIXME("Unsupported sym-tag %s\n", symt_get_tag_str(sym->tag));
/* fall through */