Eric Pouech : dbghelp/dwarf: Don't register labels without address.
Alexandre Julliard
julliard at winehq.org
Mon Nov 15 16:01:29 CST 2021
Module: wine
Branch: master
Commit: 61c8728a6eb7da6bf632be434e5a386c835ef127
URL: https://source.winehq.org/git/wine.git/?a=commit;h=61c8728a6eb7da6bf632be434e5a386c835ef127
Author: Eric Pouech <eric.pouech at gmail.com>
Date: Mon Nov 15 18:26:08 2021 +0100
dbghelp/dwarf: Don't register labels without address.
Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dbghelp/dwarf.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c
index 7b925ee53b8..d6b8de7400a 100644
--- a/dlls/dbghelp/dwarf.c
+++ b/dlls/dbghelp/dwarf.c
@@ -2065,14 +2065,18 @@ static void dwarf2_parse_subprogram_label(dwarf2_subprogram_t* subpgm,
TRACE("%s\n", dwarf2_debug_di(di));
- if (!dwarf2_find_attribute(di, DW_AT_low_pc, &low_pc)) low_pc.u.uvalue = 0;
if (!dwarf2_find_attribute(di, DW_AT_name, &name))
name.u.string = NULL;
-
- loc.kind = loc_absolute;
- loc.offset = subpgm->ctx->module_ctx->load_offset + low_pc.u.uvalue - subpgm->top_func->address;
- symt_add_function_point(subpgm->ctx->module_ctx->module, subpgm->top_func, SymTagLabel,
- &loc, name.u.string);
+ if (dwarf2_find_attribute(di, DW_AT_low_pc, &low_pc))
+ {
+ loc.kind = loc_absolute;
+ loc.offset = subpgm->ctx->module_ctx->load_offset + low_pc.u.uvalue - subpgm->top_func->address;
+ symt_add_function_point(subpgm->ctx->module_ctx->module, subpgm->top_func, SymTagLabel,
+ &loc, name.u.string);
+ }
+ else
+ WARN("Label %s inside function %s doesn't have an address... don't register it\n",
+ name.u.string, subpgm->top_func->hash_elt.name);
}
static void dwarf2_parse_subprogram_block(dwarf2_subprogram_t* subpgm,
More information about the wine-cvs
mailing list