From 8c7cc491abb7a7a31c7f87a02bd6550a1405c0ff Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Mon, 7 Jun 2010 21:48:36 +0200 Subject: [PATCH] dbghelp: In dwarf parser, properly handle array without size specified. --- dlls/dbghelp/dwarf.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c index f3e2f1207d6..6daf7d7749b 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)); - if (!di->abbrev->have_child) - { - FIXME("array without range information\n"); - return NULL; - } ref_type = dwarf2_lookup_type(ctx, di); - for (i=0; ichildren); i++) + if (!di->abbrev->have_child) + { + /* 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; + } + else for (i = 0; i < vector_length(&di->children); i++) { child = *(dwarf2_debug_info_t**)vector_at(&di->children, i); switch (child->abbrev->tag)