Eric Pouech : dbghelp/dwarf: Handle some Dwarf4 tweaks in high / low pc attributes.

Alexandre Julliard julliard at winehq.org
Tue Sep 21 15:59:04 CDT 2021


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

Author: Eric Pouech <eric.pouech at gmail.com>
Date:   Tue Sep 21 08:00:06 2021 +0200

dbghelp/dwarf: Handle some Dwarf4 tweaks in high / low pc attributes.

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

---

 dlls/dbghelp/dwarf.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c
index 16ebd5dbf65..fd50f590982 100644
--- a/dlls/dbghelp/dwarf.c
+++ b/dlls/dbghelp/dwarf.c
@@ -1244,6 +1244,24 @@ static BOOL dwarf2_read_range(dwarf2_parse_context_t* ctx, const dwarf2_debug_in
             return FALSE;
         *plow = low_pc.u.uvalue;
         *phigh = high_pc.u.uvalue;
+        if (ctx->head.version >= 4)
+            switch (high_pc.form)
+            {
+            case DW_FORM_addr:
+                break;
+            case DW_FORM_data1:
+            case DW_FORM_data2:
+            case DW_FORM_data4:
+            case DW_FORM_data8:
+            case DW_FORM_sdata:
+            case DW_FORM_udata:
+                /* From dwarf4 on, when FORM's class is constant, high_pc is an offset from low_pc */
+                *phigh += *plow;
+                break;
+            default:
+                FIXME("Unsupported class for high_pc\n");
+                break;
+            }
         return TRUE;
     }
 }




More information about the wine-cvs mailing list