Eric Pouech : dbghelp/dwarf: Handle errors in dwarf2_fill_attr by returning a boolean.
Alexandre Julliard
julliard at winehq.org
Tue Sep 14 16:00:14 CDT 2021
Module: wine
Branch: master
Commit: 12a778426d9b4ee6fa030680ba2fb5a8a3012bf6
URL: https://source.winehq.org/git/wine.git/?a=commit;h=12a778426d9b4ee6fa030680ba2fb5a8a3012bf6
Author: Eric Pouech <eric.pouech at gmail.com>
Date: Sat Sep 11 10:59:18 2021 +0200
dbghelp/dwarf: Handle errors in dwarf2_fill_attr by returning a boolean.
Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dbghelp/dwarf.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c
index b7df7f108d9..5433f12d794 100644
--- a/dlls/dbghelp/dwarf.c
+++ b/dlls/dbghelp/dwarf.c
@@ -509,7 +509,7 @@ static void dwarf2_swallow_attribute(dwarf2_traverse_context_t* ctx,
ctx->data += step;
}
-static void dwarf2_fill_attr(const dwarf2_parse_context_t* ctx,
+static BOOL dwarf2_fill_attr(const dwarf2_parse_context_t* ctx,
const dwarf2_abbrev_entry_attr_t* abbrev_attr,
const unsigned char* data,
struct attribute* attr)
@@ -637,6 +637,7 @@ static void dwarf2_fill_attr(const dwarf2_parse_context_t* ctx,
FIXME("Unhandled attribute form %lx\n", abbrev_attr->form);
break;
}
+ return TRUE;
}
static BOOL dwarf2_find_attribute(const dwarf2_parse_context_t* ctx,
@@ -655,8 +656,7 @@ static BOOL dwarf2_find_attribute(const dwarf2_parse_context_t* ctx,
{
if (abbrev_attr->attribute == at)
{
- dwarf2_fill_attr(ctx, abbrev_attr, di->data[i], attr);
- return TRUE;
+ return dwarf2_fill_attr(ctx, abbrev_attr, di->data[i], attr);
}
if ((abbrev_attr->attribute == DW_AT_abstract_origin ||
abbrev_attr->attribute == DW_AT_specification) &&
@@ -671,8 +671,8 @@ static BOOL dwarf2_find_attribute(const dwarf2_parse_context_t* ctx,
}
}
/* do we have either an abstract origin or a specification debug entry to look into ? */
- if (!ref_abbrev_attr) break;
- dwarf2_fill_attr(ctx, ref_abbrev_attr, di->data[refidx], attr);
+ if (!ref_abbrev_attr || !dwarf2_fill_attr(ctx, ref_abbrev_attr, di->data[refidx], attr))
+ break;
if (!(di = sparse_array_find(&ctx->debug_info_table, attr->u.uvalue)))
FIXME("Should have found the debug info entry\n");
}
More information about the wine-cvs
mailing list