[PATCH] [DbgHelp]: in dwarf parser, properly handle array without size specified

Eric Pouech eric.pouech at orange.fr
Mon Jun 7 14:48:36 CDT 2010




A+
---

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


diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c
index f3e2f12..6daf7d7 100644
--- a/dlls/dbghelp/dwarf.c
+++ b/dlls/dbghelp/dwarf.c
@@ -1122,14 +1122,17 @@ static struct symt* dwarf2_parse_array_type(dwarf2_parse_context_t* ctx,
 
     TRACE("%s, for %s\n", dwarf2_debug_ctx(ctx), dwarf2_debug_di(di));
 
+    ref_type = dwarf2_lookup_type(ctx, di);
+
     if (!di->abbrev->have_child)
     {
-        FIXME("array without range information\n");
-        return NULL;
+        /* fake an array with unknown size */
+        /* FIXME: int4 even on 64bit machines??? */
+        idx_type = ctx->symt_cache[sc_int4];
+        min.u.uvalue = 0;
+        max.u.uvalue = -1;
     }
-    ref_type = dwarf2_lookup_type(ctx, di);
-
-    for (i=0; i<vector_length(&di->children); i++)
+    else for (i = 0; i < vector_length(&di->children); i++)
     {
         child = *(dwarf2_debug_info_t**)vector_at(&di->children, i);
         switch (child->abbrev->tag)






More information about the wine-patches mailing list