summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-06-16 22:47:25 -0400
committerFrank Ch. Eigler <fche@elastic.org>2008-06-16 22:47:44 -0400
commit8215ea9a511c5acdec4eebb45f7e7cee8e1319bc (patch)
tree3f4b5131142b58587b809770035ad7c0316ec2b1 /tapsets.cxx
parent93fdaa0d0fed842826f105f409d6cf39e08e9d42 (diff)
downloadsystemtap-steved-8215ea9a511c5acdec4eebb45f7e7cee8e1319bc.tar.gz
systemtap-steved-8215ea9a511c5acdec4eebb45f7e7cee8e1319bc.tar.xz
systemtap-steved-8215ea9a511c5acdec4eebb45f7e7cee8e1319bc.zip
more warning/error consistency for alternatives listing
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx8
1 files changed, 1 insertions, 7 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index 41b0b34d..7bfe8b4e 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -1585,7 +1585,6 @@ struct dwflpp
void print_locals(Dwarf_Die *die, ostream &o)
{
// Try to get the first child of die.
- bool local_found = false;
Dwarf_Die child;
if (dwarf_child (die, &child) == 0)
{
@@ -1598,7 +1597,6 @@ struct dwflpp
case DW_TAG_variable:
case DW_TAG_formal_parameter:
o << " " << dwarf_diename (&child);
- local_found = true;
break;
default:
break;
@@ -1606,9 +1604,6 @@ struct dwflpp
}
while (dwarf_siblingof (&child, &child) == 0);
}
-
- if (! local_found)
- o << " (none found)";
}
Dwarf_Attribute *
@@ -1646,8 +1641,7 @@ struct dwflpp
print_locals (scopes, alternatives);
throw semantic_error ("unable to find local '" + local + "'"
+ " near pc " + lex_cast_hex<string>(pc)
- + " (alternatives:" + alternatives.str ()
- + ")");
+ + (alternatives.str() == "" ? "" : (" (alternatives:" + alternatives.str () + ")")));
}
for (int inner = 0; inner < nscopes; ++inner)