[PATCH] dbghelp: return name of compiland in SymGetTypeInfo
Eric Pouech
eric.pouech at gmail.com
Fri Aug 20 03:35:04 CDT 2021
Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
---
dlls/dbghelp/dbghelp_private.h | 1 +
dlls/dbghelp/symbol.c | 1 +
dlls/dbghelp/type.c | 2 ++
3 files changed, 4 insertions(+)
diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h
index 3415fc1557c..d87b1b5ecde 100644
--- a/dlls/dbghelp/dbghelp_private.h
+++ b/dlls/dbghelp/dbghelp_private.h
@@ -164,6 +164,7 @@ struct symt_block
struct symt_compiland
{
struct symt symt;
+ struct module* module;
ULONG_PTR address;
unsigned source;
struct vector vchildren; /* global variables & functions */
diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c
index b2b4d578910..df952fc3984 100644
--- a/dlls/dbghelp/symbol.c
+++ b/dlls/dbghelp/symbol.c
@@ -190,6 +190,7 @@ struct symt_compiland* symt_new_compiland(struct module* module,
if ((sym = pool_alloc(&module->pool, sizeof(*sym))))
{
sym->symt.tag = SymTagCompiland;
+ sym->module = module;
sym->address = address;
sym->source = src_idx;
vector_init(&sym->vchildren, sizeof(struct symt*), 32);
diff --git a/dlls/dbghelp/type.c b/dlls/dbghelp/type.c
index 374b69aeb08..8e91eb3c554 100644
--- a/dlls/dbghelp/type.c
+++ b/dlls/dbghelp/type.c
@@ -87,6 +87,8 @@ const char* symt_get_name(const struct symt* sym)
case SymTagBaseType: return ((const struct symt_basic*)sym)->hash_elt.name;
case SymTagLabel: return ((const struct symt_hierarchy_point*)sym)->hash_elt.name;
case SymTagThunk: return ((const struct symt_thunk*)sym)->hash_elt.name;
+ case SymTagCompiland: return source_get(((const struct symt_compiland*)sym)->module,
+ ((const struct symt_compiland*)sym)->source);
/* hierarchy tree */
case SymTagEnum: return ((const struct symt_enum*)sym)->name;
case SymTagTypedef: return ((const struct symt_typedef*)sym)->hash_elt.name;
More information about the wine-devel
mailing list