Eric Pouech : dbghelp: Return proper size for local & parameters in SYMBOL_INFO.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Dec 19 14:22:12 CST 2005


Module: wine
Branch: refs/heads/master
Commit: 750575ccf29c6ae1a478ef4f81f6d1054ef926c3
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=750575ccf29c6ae1a478ef4f81f6d1054ef926c3

Author: Eric Pouech <eric.pouech at wanadoo.fr>
Date:   Mon Dec 19 18:20:47 2005 +0100

dbghelp: Return proper size for local & parameters in SYMBOL_INFO.

---

 dlls/dbghelp/dbghelp_private.h |    2 +-
 dlls/dbghelp/symbol.c          |    5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h
index d2445cd..1291162 100644
--- a/dlls/dbghelp/dbghelp_private.h
+++ b/dlls/dbghelp/dbghelp_private.h
@@ -142,7 +142,7 @@ struct symt_data
         unsigned long           address;        /* DataIs{Global, FileStatic} */
         struct
         {
-            long                        offset; /* DataIs{Member,Local,Param} in bits*/
+            long                        offset; /* DataIs{Member,Local,Param} in bits */
             unsigned long               length; /* DataIs{Member} in bits */
             unsigned long               reg_id; /* DataIs{Local} (0 if frame relative) */
         } s;
diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c
index 29e7d1f..74634d1 100644
--- a/dlls/dbghelp/symbol.c
+++ b/dlls/dbghelp/symbol.c
@@ -448,7 +448,10 @@ static void symt_fill_sym_info(const str
     if (!symt_get_info(sym, TI_GET_TYPE, &sym_info->TypeIndex))
         sym_info->TypeIndex = 0;
     sym_info->info = (DWORD)sym;
-    symt_get_info(sym, TI_GET_LENGTH, &size);
+    if (!symt_get_info(sym, TI_GET_LENGTH, &size) &&
+        sym_info->TypeIndex &&
+        !symt_get_info((struct symt*)sym_info->TypeIndex, TI_GET_LENGTH, &size))
+        size = 0;
     sym_info->Size = (DWORD)size;
     sym_info->ModBase = module->module.BaseOfImage;
     sym_info->Flags = 0;




More information about the wine-cvs mailing list