[PATCH 1/5] [DBGHELP 1/5] use correct record in codeview_snarf_public.

Andreas Maier staubim at quantentunnel.de
Sun Nov 25 03:15:46 CST 2018


Use public_vx iststead of data_vx for public symbols.

Signed-off-by: Andreas Maier <staubim at quantentunnel.de>
---
 dlls/dbghelp/msc.c     | 18 +++++++++---------
 include/wine/mscvpdb.h | 10 ++++++++++
 2 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c
index 493c440ea7..ae51884abc 100644
--- a/dlls/dbghelp/msc.c
+++ b/dlls/dbghelp/msc.c
@@ -2067,29 +2067,29 @@ static BOOL codeview_snarf_public(const struct msc_debug_info* msc_dbg, const BY
 
         switch (sym->generic.id)
         {
-	case S_PUB_V1: /* FIXME is this really a 'data_v1' structure ?? */
+        case S_PUB_V1:
             if (!(dbghelp_options & SYMOPT_NO_PUBLICS))
             {
                 symt_new_public(msc_dbg->module, compiland,
-                                terminate_string(&sym->data_v1.p_name),
-                                codeview_get_address(msc_dbg, sym->data_v1.segment, sym->data_v1.offset), 1);
+                                terminate_string(&sym->public_v1.p_name),
+                                codeview_get_address(msc_dbg, sym->public_v1.segment, sym->public_v1.offset), 1);
             }
             break;
-	case S_PUB_V2: /* FIXME is this really a 'data_v2' structure ?? */
+        case S_PUB_V2:
             if (!(dbghelp_options & SYMOPT_NO_PUBLICS))
             {
                 symt_new_public(msc_dbg->module, compiland,
-                                terminate_string(&sym->data_v2.p_name),
-                                codeview_get_address(msc_dbg, sym->data_v2.segment, sym->data_v2.offset), 1);
+                                terminate_string(&sym->public_v2.p_name),
+                                codeview_get_address(msc_dbg, sym->public_v2.segment, sym->public_v2.offset), 1);
             }
-	    break;
+            break;
 
         case S_PUB_V3:
             if (!(dbghelp_options & SYMOPT_NO_PUBLICS))
             {
                 symt_new_public(msc_dbg->module, compiland,
-                                sym->data_v3.name,
-                                codeview_get_address(msc_dbg, sym->data_v3.segment, sym->data_v3.offset), 1);
+                                sym->public_v3.name,
+                                codeview_get_address(msc_dbg, sym->public_v3.segment, sym->public_v3.offset), 1);
             }
             break;
         case S_PUB_FUNC1_V3:
diff --git a/include/wine/mscvpdb.h b/include/wine/mscvpdb.h
index 2f0b47998f..7a4a69beb9 100644
--- a/include/wine/mscvpdb.h
+++ b/include/wine/mscvpdb.h
@@ -1352,6 +1352,16 @@ union codeview_symbol
     {
         short int               len;
         short int               id;
+        unsigned int            offset;
+        unsigned short          segment;
+        unsigned short          symtype;
+        struct p_string         p_name;
+    } public_v1;
+
+    struct
+    {
+        short int               len;
+        short int               id;
         unsigned int            symtype;
         unsigned int            offset;
         unsigned short          segment;
-- 
2.11.0




More information about the wine-devel mailing list