[PATCH 01/16] Added full support for DW_FORM_data8 attributes, as well as primary support for DW_FORM_block* attributes

Eric Pouech eric.pouech at orange.fr
Mon Mar 15 15:12:22 CDT 2010




A+
---

 dlls/dbghelp/dwarf.c |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)


diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c
index 433dca8..069cc79 100644
--- a/dlls/dbghelp/dwarf.c
+++ b/dlls/dbghelp/dwarf.c
@@ -139,6 +139,7 @@ struct attribute
     union
     {
         unsigned long                   uvalue;
+        unsigned long long              lluvalue;
         long                            svalue;
         const char*                     string;
         struct dwarf2_block             block;
@@ -512,9 +513,8 @@ static void dwarf2_fill_attr(const dwarf2_parse_context_t* ctx,
         break;
 
     case DW_FORM_data8:
-        attr->u.block.size = 8;
-        attr->u.block.ptr  = data;
-        data += 8;
+        attr->u.lluvalue = dwarf2_get_u8(data);
+        TRACE("data8<%s>\n", wine_dbgstr_longlong(attr->u.uvalue));
         break;
 
     case DW_FORM_ref1:
@@ -1480,6 +1480,11 @@ static void dwarf2_parse_variable(dwarf2_subprogram_t* subpgm,
             v.n1.n2.n3.lVal = value.u.uvalue;
             break;
 
+        case DW_FORM_data8:
+            v.n1.n2.vt = VT_UI8;
+            v.n1.n2.n3.llVal = value.u.lluvalue;
+            break;
+
         case DW_FORM_sdata:
             v.n1.n2.vt = VT_I4;
             v.n1.n2.n3.lVal = value.u.svalue;
@@ -1511,12 +1516,6 @@ static void dwarf2_parse_variable(dwarf2_subprogram_t* subpgm,
             }
             break;
 
-        case DW_FORM_data8:
-	    v.n1.n2.vt = VT_I1 | VT_BYREF;
-	    v.n1.n2.n3.byref = pool_alloc(&subpgm->ctx->module->pool, value.u.block.size);
-	    memcpy(v.n1.n2.n3.byref, value.u.block.ptr, value.u.block.size);
-	    break;
-
         default:
             FIXME("Unsupported form for const value %s (%lx)\n",
                   name.u.string, value.form);






More information about the wine-patches mailing list