[PATCH 17/22] [DbgHelp]: dwarf & void

Eric Pouech eric.pouech at wanadoo.fr
Fri Nov 24 15:18:31 CST 2006


- properly handle the void type in some declarations

A+
---

 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 5e13257..5fdf038 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);



More information about the wine-patches mailing list