Eric Pouech : dbghelp: Return proper null value when lookup_type fails.
Alexandre Julliard
julliard at winehq.org
Mon Mar 28 14:21:59 CDT 2011
Module: wine
Branch: master
Commit: 96a38c93d54751c5593e5780e1722322cb498e1f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=96a38c93d54751c5593e5780e1722322cb498e1f
Author: Eric Pouech <eric.pouech at orange.fr>
Date: Sat Mar 26 12:16:39 2011 +0100
dbghelp: Return proper null value when lookup_type fails.
---
dlls/dbghelp/dwarf.c | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c
index 5596c45..f0eabaf 100644
--- a/dlls/dbghelp/dwarf.c
+++ b/dlls/dbghelp/dwarf.c
@@ -941,22 +941,24 @@ static BOOL dwarf2_compute_location_attr(dwarf2_parse_context_t* ctx,
static struct symt* dwarf2_lookup_type(dwarf2_parse_context_t* ctx,
const dwarf2_debug_info_t* di)
{
- struct attribute attr;
+ struct attribute attr;
+ dwarf2_debug_info_t* type;
- if (dwarf2_find_attribute(ctx, di, DW_AT_type, &attr))
+ if (!dwarf2_find_attribute(ctx, di, DW_AT_type, &attr))
+ return NULL;
+ if (!(type = sparse_array_find(&ctx->debug_info_table, attr.u.uvalue)))
{
- dwarf2_debug_info_t* type;
-
- type = sparse_array_find(&ctx->debug_info_table, attr.u.uvalue);
- if (!type) FIXME("Unable to find back reference to type %lx\n", attr.u.uvalue);
+ FIXME("Unable to find back reference to type %lx\n", attr.u.uvalue);
+ return NULL;
+ }
+ if (!type->symt)
+ {
+ /* load the debug info entity */
+ dwarf2_load_one_entry(ctx, type);
if (!type->symt)
- {
- /* load the debug info entity */
- dwarf2_load_one_entry(ctx, type);
- }
- return type->symt;
+ FIXME("Unable to load forward reference for tag %lx\n", type->abbrev->tag);
}
- return NULL;
+ return type->symt;
}
static const char* dwarf2_get_cpp_name(dwarf2_parse_context_t* ctx, dwarf2_debug_info_t* di, const char* name)
More information about the wine-cvs
mailing list