Eric Pouech : dbghelp/dwarf: Add definitions of some GNU extensions for FORMs.

Alexandre Julliard julliard at winehq.org
Tue Sep 14 16:00:14 CDT 2021


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

Author: Eric Pouech <eric.pouech at gmail.com>
Date:   Sat Sep 11 10:59:24 2021 +0200

dbghelp/dwarf: Add definitions of some GNU extensions for FORMs.

And return failure when encoutering them, as they are not supported yet.

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

---

 dlls/dbghelp/dwarf.c | 10 ++++++++++
 dlls/dbghelp/dwarf.h |  4 ++++
 2 files changed, 14 insertions(+)

diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c
index 5433f12d794..7a9efe56312 100644
--- a/dlls/dbghelp/dwarf.c
+++ b/dlls/dbghelp/dwarf.c
@@ -501,6 +501,8 @@ static void dwarf2_swallow_attribute(dwarf2_traverse_context_t* ctx,
     case DW_FORM_block2: step = dwarf2_parse_u2(ctx); break;
     case DW_FORM_block4: step = dwarf2_parse_u4(ctx); break;
     case DW_FORM_sec_offset:
+    case DW_FORM_GNU_ref_alt:
+    case DW_FORM_GNU_strp_alt:
     case DW_FORM_strp:   step = head->offset_size; break;
     default:
         FIXME("Unhandled attribute form %lx\n", abbrev_attr->form);
@@ -633,6 +635,14 @@ static BOOL dwarf2_fill_attr(const dwarf2_parse_context_t* ctx,
         TRACE("sec_offset<%s>\n", wine_dbgstr_longlong(attr->u.lluvalue));
         break;
 
+    case DW_FORM_GNU_ref_alt:
+        FIXME("Unhandled FORM_GNU_ref_alt\n");
+        attr->u.uvalue = 0;
+        return FALSE;
+    case DW_FORM_GNU_strp_alt:
+        FIXME("Unhandled FORM_GNU_strp_alt\n");
+        attr->u.string = NULL;
+        return FALSE;
     default:
         FIXME("Unhandled attribute form %lx\n", abbrev_attr->form);
         break;
diff --git a/dlls/dbghelp/dwarf.h b/dlls/dbghelp/dwarf.h
index 603c302d136..a50a7251876 100644
--- a/dlls/dbghelp/dwarf.h
+++ b/dlls/dbghelp/dwarf.h
@@ -266,6 +266,10 @@ typedef enum dwarf_form_e
   DW_FORM_exprloc                       = 0x18,
   DW_FORM_flag_present                  = 0x19,
   DW_FORM_ref_sig8                      = 0x20,
+
+  /** GNU extensions */
+  DW_FORM_GNU_ref_alt                   = 0x1f20,
+  DW_FORM_GNU_strp_alt                  = 0x1f21,
 } dwarf_form_t;
 
 /** type encoding */




More information about the wine-cvs mailing list