Eric Pouech : dbghelp/msc: Support S_SEPCODE codeview record.

Alexandre Julliard julliard at winehq.org
Mon Nov 15 16:01:29 CST 2021


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

Author: Eric Pouech <eric.pouech at gmail.com>
Date:   Mon Nov 15 18:26:48 2021 +0100

dbghelp/msc: Support S_SEPCODE codeview record.

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

---

 dlls/dbghelp/msc.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c
index d62f06f5606..894d01a4c00 100644
--- a/dlls/dbghelp/msc.c
+++ b/dlls/dbghelp/msc.c
@@ -2497,6 +2497,27 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg,
                   sym->heap_alloc_site_v3.inst_len, sym->heap_alloc_site_v3.index);
             break;
 
+        case S_SEPCODE:
+            if (!top_func)
+            {
+                ULONG_PTR parent_addr = codeview_get_address(msc_dbg, sym->sepcode_v3.sectParent, sym->sepcode_v3.offParent);
+                struct symt_ht* parent = symt_find_nearest(msc_dbg->module, parent_addr);
+                if (symt_check_tag(&parent->symt, SymTagFunction))
+                {
+                    struct symt_function* pfunc = (struct symt_function*)parent;
+                    top_func = symt_new_function(msc_dbg->module, compiland, pfunc->hash_elt.name,
+                                                 codeview_get_address(msc_dbg, sym->sepcode_v3.sect, sym->sepcode_v3.off),
+                                                 sym->sepcode_v3.length, pfunc->type);
+                    curr_func = top_func;
+                }
+                else
+                    WARN("Couldn't find function referenced by S_SEPCODE at %04x:%08x\n",
+                         sym->sepcode_v3.sectParent, sym->sepcode_v3.offParent);
+            }
+            else
+                FIXME("S_SEPCODE inside top-level function %s\n", top_func->hash_elt.name);
+            break;
+
         /* the symbols we can safely ignore for now */
         case S_TRAMPOLINE:
         case S_FRAMEPROC:




More information about the wine-cvs mailing list