diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2008-06-16 22:47:25 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2008-06-16 22:47:44 -0400 |
commit | 8215ea9a511c5acdec4eebb45f7e7cee8e1319bc (patch) | |
tree | 3f4b5131142b58587b809770035ad7c0316ec2b1 | |
parent | 93fdaa0d0fed842826f105f409d6cf39e08e9d42 (diff) | |
download | systemtap-steved-8215ea9a511c5acdec4eebb45f7e7cee8e1319bc.tar.gz systemtap-steved-8215ea9a511c5acdec4eebb45f7e7cee8e1319bc.tar.xz systemtap-steved-8215ea9a511c5acdec4eebb45f7e7cee8e1319bc.zip |
more warning/error consistency for alternatives listing
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | tapsets.cxx | 8 |
2 files changed, 6 insertions, 7 deletions
@@ -1,5 +1,10 @@ 2008-06-16 Frank Ch. Eigler <fche@elastic.org> + * tapsets.cxx (print_locals): Produce nothing instead of + "(alternatives: (none found))" if no alternatives were found. + +2008-06-16 Frank Ch. Eigler <fche@elastic.org> + * elaborate.cxx (session::print_warning): Change to take optional token as argument. (*): Adjust callers of print_warning() to pass a token. 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) |