summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorgraydon <graydon>2005-08-31 03:05:39 +0000
committergraydon <graydon>2005-08-31 03:05:39 +0000
commit246b383e71b24882db18311a748d713c57a2108e (patch)
treee27f8baf030463152941112db10dbaf0e2800b67 /tapsets.cxx
parentd7f37943633359c2e7e61ba8c84d15144aa3b87f (diff)
downloadsystemtap-steved-246b383e71b24882db18311a748d713c57a2108e.tar.gz
systemtap-steved-246b383e71b24882db18311a748d713c57a2108e.tar.xz
systemtap-steved-246b383e71b24882db18311a748d713c57a2108e.zip
2005-08-30 Graydon Hoare <graydon@redhat.com>
* tapsets.cxx (dwflpp::literal_stmt_for_local): Handle dwarf pointer-to-1-byte-means-char case (found in PR 1187) * parse.cxx (parse_symbol): Eliminate use of "." from target symbol parser, conflicting with string concatenation operator. * staptree.h (target_symbol::component_type) Eliminate comp_struct_pointer_member, since . and -> are considered the same now. * staptree.cxx (target_symbol::print): Likewise. * testsuite/buildok/seventeen.stp: Test solution on PR 1191. * testsuite/buildok/six.stp: Test working portion of PR 1155. * testsuite/semko/nineteen.stp: Unresolved portion of PR 1155.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index 0910c50d..4d44fb03 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -919,6 +919,7 @@ dwflpp
Dwarf_Die pointee_typedie_mem;
Dwarf_Die *pointee_typedie;
Dwarf_Word pointee_encoding;
+ Dwarf_Word pointee_byte_size = 0;
int pointee_typetag;
if (dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem) == NULL)
@@ -940,13 +941,18 @@ dwflpp
if (dwarf_attr_integrate (pointee_typedie, DW_AT_type, &attr_mem) == NULL)
throw semantic_error ("cannot get type of pointee: " + string(dwarf_errmsg (-1)));
}
+
+ if (dwarf_attr_integrate (pointee_typedie, DW_AT_byte_size, &attr_mem))
+ dwarf_formudata (&attr_mem, &pointee_byte_size);
dwarf_formudata (dwarf_attr_integrate (pointee_typedie, DW_AT_encoding, &attr_mem),
&pointee_encoding);
if (pointee_typetag == DW_TAG_base_type
&& (pointee_encoding == DW_ATE_signed_char
- || pointee_encoding == DW_ATE_unsigned_char))
+ || pointee_encoding == DW_ATE_unsigned_char
+ || ((pointee_encoding == DW_ATE_signed
+ || pointee_encoding == DW_ATE_unsigned) && pointee_byte_size == 1)))
{
// We have an (un)signed char* or (un)signed char[], fetch it into 'tmpc' and
// then copy to the return value via something strcpy-ish.