diff options
author | Josh Stone <jistone@redhat.com> | 2009-08-19 18:23:32 -0700 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2009-08-19 18:23:32 -0700 |
commit | c4dddae6566edc2035bda078929e26fd32ea4e21 (patch) | |
tree | 64511f78bda1db9841452ee4e0c543d6330d211b /dwflpp.cxx | |
parent | 72c5ecc2fffe43146eaf54284cf9626b7f76cb78 (diff) | |
download | systemtap-steved-c4dddae6566edc2035bda078929e26fd32ea4e21.tar.gz systemtap-steved-c4dddae6566edc2035bda078929e26fd32ea4e21.tar.xz systemtap-steved-c4dddae6566edc2035bda078929e26fd32ea4e21.zip |
Give a more exact error for dereferencing void*
* dwflpp.cxx (dwflpp::translate_components): Check for void* deref.
Diffstat (limited to 'dwflpp.cxx')
-rw-r--r-- | dwflpp.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1713,6 +1713,12 @@ dwflpp::translate_components(struct obstack *pool, break; case DW_TAG_pointer_type: + /* A pointer with no type is a void* -- can't dereference it. */ + if (!dwarf_hasattr_integrate (die, DW_AT_type)) + throw semantic_error ("invalid access '" + lex_cast<string>(c) + + "' vs. " + dwarf_type_name(die), + c.tok); + c_translate_pointer (pool, 1, 0 /* PR9768*/, die, tail); if (c.type != target_symbol::comp_literal_array_index && c.type != target_symbol::comp_expression_array_index) |