From ea484b939860edee002f5c2b6db2c903ec1786b1 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 7 Mar 2012 15:22:57 +0100 Subject: [PATCH] Fix kallsyms_expand_symbol.exp regression after commit 4d51e8. In dwflpp::find_variable_and_frame_base() when we do a search for a search for an alternative vardie we need to saved the actual vardie content in case we fail, no just copy the pointer to the vardie data... --- dwflpp.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dwflpp.cxx b/dwflpp.cxx index ab4e6d5cc..c356f55a5 100644 --- a/dwflpp.cxx +++ b/dwflpp.cxx @@ -2157,7 +2157,7 @@ dwflpp::find_variable_and_frame_base (vector& scopes, && dwarf_attr_integrate (vardie, DW_AT_external, &attr_mem) != NULL && dwarf_tag(&scopes[declaring_scope]) == DW_TAG_compile_unit) { - Dwarf_Die *orig_vardie = vardie; + Dwarf_Die orig_vardie = *vardie; bool alt_found = false; if (dwarf_child(&scopes[declaring_scope], vardie) == 0) do @@ -2175,7 +2175,7 @@ dwflpp::find_variable_and_frame_base (vector& scopes, while (!alt_found && dwarf_siblingof(vardie, vardie) == 0); if (! alt_found) - vardie = orig_vardie; + *vardie = orig_vardie; } /* We start out walking the "lexical scopes" as returned by -- 2.43.5