summaryrefslogtreecommitdiffstats
path: root/dwflpp.cxx
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2009-08-19 16:02:26 -0500
committerDavid Smith <dsmith@redhat.com>2009-08-19 16:02:26 -0500
commit4b9c969abcaeb089f7473e08cee420b99c4e287c (patch)
tree8b5e3940e0011050db5904c1bba44b93c6564871 /dwflpp.cxx
parentb1e56041f6f6bee89b1d4a7fb2f76d48cb21fbf2 (diff)
parentb57ba9b863f0bd99f70d9e4d64c5a11ec75f7317 (diff)
downloadsystemtap-steved-4b9c969abcaeb089f7473e08cee420b99c4e287c.tar.gz
systemtap-steved-4b9c969abcaeb089f7473e08cee420b99c4e287c.tar.xz
systemtap-steved-4b9c969abcaeb089f7473e08cee420b99c4e287c.zip
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'dwflpp.cxx')
-rw-r--r--dwflpp.cxx15
1 files changed, 8 insertions, 7 deletions
diff --git a/dwflpp.cxx b/dwflpp.cxx
index 73848429..b5663fff 100644
--- a/dwflpp.cxx
+++ b/dwflpp.cxx
@@ -1624,9 +1624,9 @@ dwflpp::find_struct_member(const target_symbol::component& c,
vector<Dwarf_Attribute>& locs)
{
Dwarf_Attribute attr;
- Dwarf_Die die = *parentdie;
+ Dwarf_Die die;
- switch (dwarf_child (&die, &die))
+ switch (dwarf_child (parentdie, &die))
{
case 0: /* First child found. */
break;
@@ -1634,8 +1634,8 @@ dwflpp::find_struct_member(const target_symbol::component& c,
return false;
case -1: /* Error. */
default: /* Shouldn't happen */
- throw semantic_error (string (dwarf_tag(&die) == DW_TAG_union_type ? "union" : "struct")
- + string (dwarf_diename (&die) ?: "<anonymous>")
+ throw semantic_error (string (dwarf_tag(parentdie) == DW_TAG_union_type ? "union" : "struct")
+ + string (dwarf_diename (parentdie) ?: "<anonymous>")
+ string (dwarf_errmsg (-1)),
c.tok);
}
@@ -1774,17 +1774,18 @@ dwflpp::translate_components(struct obstack *pool,
}
{
+ Dwarf_Die parentdie = *die;
vector<Dwarf_Attribute> locs;
- if (!find_struct_member(c, die, die, locs))
+ if (!find_struct_member(c, &parentdie, die, locs))
{
string alternatives;
stringstream members;
- print_members(die, members);
+ print_members(&parentdie, members);
if (members.str().size() != 0)
alternatives = " (alternatives:" + members.str();
throw semantic_error("unable to find member '" +
c.member + "' for struct "
- + string(dwarf_diename(die) ?: "<unknown>")
+ + string(dwarf_diename(&parentdie) ?: "<unknown>")
+ alternatives,
c.tok);
}