From 6f0f3fa7950b253e7fd910017920b3c8c9a2b220 Mon Sep 17 00:00:00 2001 From: Nikolai Nosov Date: Sun, 2 Feb 2020 15:44:52 +0400 Subject: [PATCH] handle_location: fix value retrieval --- framework/dwarf_utils.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/framework/dwarf_utils.cpp b/framework/dwarf_utils.cpp index ea0bf18..bc7901c 100644 --- a/framework/dwarf_utils.cpp +++ b/framework/dwarf_utils.cpp @@ -35,6 +35,7 @@ bool handle_location(pst_context* ctx, Dwarf_Attribute* attr, pst_dwarf_expr* lo loc->setup(loc, expr, exprlen); ctx->print_expr(ctx, expr, exprlen, attr); ret = stack.calc(&stack, expr, exprlen, attr, fun); + stack.get_value(&stack, &loc->value); } } else if(dwarf_hasform(attr, DW_FORM_sec_offset)) { // Location list (loclist class of location in DWARF terms) @@ -48,6 +49,7 @@ bool handle_location(pst_context* ctx, Dwarf_Attribute* attr, pst_dwarf_expr* lo loc->setup(loc, expr, exprlen); // actual location, try to calculate Location expression ret = stack.calc(&stack, expr, exprlen, attr, fun); + stack.get_value(&stack, &loc->value); } else { // Location skipped due to don't match current PC offset pst_log(SEVERITY_DEBUG, "Skip Location list expression: [%d] (low_offset: 0x%" PRIx64 ", high_offset: 0x%" PRIx64 "), \"%s\"", i, start, end, ctx->buff);