summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorfche <fche>2007-03-07 15:45:23 +0000
committerfche <fche>2007-03-07 15:45:23 +0000
commit2302c47e71053a8081b84cae3cf1f53f33b54154 (patch)
tree39ad66c1ebaf3e329bdb10642223060aeedca7f1 /tapsets.cxx
parent7eb5f86385dec92c2f937b33be309b0028427eeb (diff)
downloadsystemtap-steved-2302c47e71053a8081b84cae3cf1f53f33b54154.tar.gz
systemtap-steved-2302c47e71053a8081b84cae3cf1f53f33b54154.tar.xz
systemtap-steved-2302c47e71053a8081b84cae3cf1f53f33b54154.zip
2007-03-07 Frank Ch. Eigler <fche@elastic.org>
PR 4166. * tapsets.cxx (translate_components): Throw an exception rather then suffer an assertion failure for $ptr[index] expressions.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index a156ca7f..2ca24573 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -1440,7 +1440,9 @@ struct dwflpp
case DW_TAG_pointer_type:
if (components[i].first == target_symbol::comp_literal_array_index)
- goto subscript;
+ throw semantic_error ("cannot index pointer");
+ // XXX: of course, we should support this the same way C does,
+ // by explicit pointer arithmetic etc.
c_translate_pointer (pool, 1, module_bias, die, tail);
break;
@@ -1448,7 +1450,6 @@ struct dwflpp
case DW_TAG_array_type:
if (components[i].first == target_symbol::comp_literal_array_index)
{
- subscript:
c_translate_array (pool, 1, module_bias, die, tail,
NULL, lex_cast<Dwarf_Word>(components[i].second));
++i;