Eric Pouech : dbghelp: In dwarf parser, properly handle array without size specified.
Alexandre Julliard
julliard at winehq.org
Tue Jun 8 10:08:22 CDT 2010
Module: wine
Branch: master
Commit: 8c7cc491abb7a7a31c7f87a02bd6550a1405c0ff
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8c7cc491abb7a7a31c7f87a02bd6550a1405c0ff
Author: Eric Pouech <eric.pouech at orange.fr>
Date: Mon Jun 7 21:48:36 2010 +0200
dbghelp: In dwarf parser, properly handle array without size specified.
---
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-cvs
mailing list