summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2008-09-30 16:35:13 +0200
committerMark Wielaard <mjw@redhat.com>2008-09-30 16:35:13 +0200
commita3de5d6e615aafb9528e22db5eeb6ddc12823256 (patch)
tree664e68a02748bfb4df76e5bbe2f493a4d3141d16 /tapsets.cxx
parent338e2309ef67c7b0d1ac3df852502e55bc316c8a (diff)
downloadsystemtap-steved-a3de5d6e615aafb9528e22db5eeb6ddc12823256.tar.gz
systemtap-steved-a3de5d6e615aafb9528e22db5eeb6ddc12823256.tar.xz
systemtap-steved-a3de5d6e615aafb9528e22db5eeb6ddc12823256.zip
Don't crash when reporting an error if getting alternatives fails.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index b1475997..a5a62c7a 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -2241,7 +2241,8 @@ struct dwflpp
{
die = dwarf_formref_die (&attr_mem, &vardie);
stringstream alternatives;
- print_members(die,alternatives);
+ if (die != NULL)
+ print_members(die,alternatives);
throw semantic_error("unable to find local '" + local + "'"
+ " near pc " + lex_cast_hex<string>(pc)
+ (alternatives.str() == "" ? "" : (" (alternatives:" + alternatives.str () + ")")));
@@ -2317,7 +2318,8 @@ struct dwflpp
{
die = dwarf_formref_die (&attr_mem, vardie);
stringstream alternatives;
- print_members(die,alternatives);
+ if (die != NULL)
+ print_members(die,alternatives);
throw semantic_error("unable to find return value"
" near pc " + lex_cast_hex<string>(pc)
+ (alternatives.str() == "" ? "" : (" (alternatives:" + alternatives.str () + ")")));