Eric Pouech : dbghelp: Fill more fields in SYMBOL_INFO in SymGetTypeFromName.

Alexandre Julliard julliard at winehq.org
Mon Aug 30 15:53:52 CDT 2021


Module: wine
Branch: master
Commit: 5c271afc99e9cdf7545945d70a4b733bf02b6a1e
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=5c271afc99e9cdf7545945d70a4b733bf02b6a1e

Author: Eric Pouech <eric.pouech at gmail.com>
Date:   Mon Aug 30 09:24:10 2021 +0200

dbghelp: Fill more fields in SYMBOL_INFO in SymGetTypeFromName.

Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dbghelp/type.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/dlls/dbghelp/type.c b/dlls/dbghelp/type.c
index 1a76ec70bbb..4621c3f3638 100644
--- a/dlls/dbghelp/type.c
+++ b/dlls/dbghelp/type.c
@@ -914,6 +914,7 @@ BOOL WINAPI SymGetTypeFromName(HANDLE hProcess, ULONG64 BaseOfDll,
 {
     struct module_pair  pair;
     struct symt*        type;
+    DWORD64             size;
 
     pair.pcs = process_find_by_handle(hProcess);
     if (!pair.pcs) return FALSE;
@@ -921,7 +922,12 @@ BOOL WINAPI SymGetTypeFromName(HANDLE hProcess, ULONG64 BaseOfDll,
     if (!module_get_debug(&pair)) return FALSE;
     type = symt_find_type_by_name(pair.effective, SymTagNull, Name);
     if (!type) return FALSE;
-    Symbol->TypeIndex = symt_ptr2index(pair.effective, type);
+    Symbol->Index = Symbol->TypeIndex = symt_ptr2index(pair.effective, type);
+    symbol_setname(Symbol, symt_get_name(type));
+    symt_get_info(pair.effective, type, TI_GET_LENGTH, &size);
+    Symbol->Size = size;
+    Symbol->ModBase = pair.requested->module.BaseOfImage;
+    Symbol->Tag = type->tag;
 
     return TRUE;
 }




More information about the wine-cvs mailing list