Module: wine Branch: master Commit: 31f4f1b00369a7be1431a0af7835d130836d0fd0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=31f4f1b00369a7be1431a0af78...
Author: Eric Pouech eric.pouech@wanadoo.fr Date: Fri Nov 24 22:18:31 2006 +0100
dbghelp: Properly handle the void type in some declarations.
---
dlls/dbghelp/dwarf.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c index 5d81d95..bf77335 100644 --- a/dlls/dbghelp/dwarf.c +++ b/dlls/dbghelp/dwarf.c @@ -979,7 +979,8 @@ static struct symt* dwarf2_parse_pointer TRACE("%s, for %s\n", dwarf2_debug_ctx(ctx), dwarf2_debug_di(di));
if (!dwarf2_find_attribute(ctx, di, DW_AT_byte_size, &size)) size.u.uvalue = 0; - ref_type = dwarf2_lookup_type(ctx, di); + if (!(ref_type = dwarf2_lookup_type(ctx, di))) + ref_type = &symt_new_basic(ctx->module, btVoid, "void", 0)->symt;
di->symt = &symt_new_pointer(ctx->module, ref_type)->symt; if (di->abbrev->have_child) FIXME("Unsupported children\n"); @@ -1496,7 +1497,8 @@ static struct symt* dwarf2_parse_subprog if (!dwarf2_find_attribute(ctx, di, DW_AT_declaration, &is_decl)) is_decl.u.uvalue = 0;
- ret_type = dwarf2_lookup_type(ctx, di); + if (!(ret_type = dwarf2_lookup_type(ctx, di))) + ret_type = &symt_new_basic(ctx->module, btVoid, "void", 0)->symt;
/* FIXME: assuming C source code */ sig_type = symt_new_function_signature(ctx->module, ret_type, CV_CALL_FAR_C); @@ -1588,7 +1590,8 @@ static struct symt* dwarf2_parse_subrout
TRACE("%s, for %s\n", dwarf2_debug_ctx(ctx), dwarf2_debug_di(di));
- ret_type = dwarf2_lookup_type(ctx, di); + if (!(ret_type = dwarf2_lookup_type(ctx, di))) + ret_type = &symt_new_basic(ctx->module, btVoid, "void", 0)->symt;
/* FIXME: assuming C source code */ sig_type = symt_new_function_signature(ctx->module, ret_type, CV_CALL_FAR_C);