summaryrefslogtreecommitdiffstats
path: root/loc2c.c
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-07-14 17:57:16 -0700
committerJosh Stone <jistone@redhat.com>2009-07-14 17:57:16 -0700
commitd52761f89a1826b1cca29b1a63269eafe7197756 (patch)
treea5b5d178e1586fb1d4cdc2733089b8d6cb753be9 /loc2c.c
parent9344d46f4186dbeaff984b1af6333d5c55221cd5 (diff)
downloadsystemtap-steved-d52761f89a1826b1cca29b1a63269eafe7197756.tar.gz
systemtap-steved-d52761f89a1826b1cca29b1a63269eafe7197756.tar.xz
systemtap-steved-d52761f89a1826b1cca29b1a63269eafe7197756.zip
PR4166: Allow array-like indexing on pointers
* dwflpp.cxx (dwflpp::translate_components): let pointers get treated the same as arrays, and add a final DIE dereference for array access. * loc2c.c (c_translate_array): tolerate pointer types * testsuite/systemtap.base/pointer_array.*: new test
Diffstat (limited to 'loc2c.c')
-rw-r--r--loc2c.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/loc2c.c b/loc2c.c
index 5f4e4495..15434632 100644
--- a/loc2c.c
+++ b/loc2c.c
@@ -1745,7 +1745,8 @@ c_translate_array (struct obstack *pool, int indent,
Dwarf_Die *typedie, struct location **input,
const char *idx, Dwarf_Word const_idx)
{
- assert (dwarf_tag (typedie) == DW_TAG_array_type);
+ assert (dwarf_tag (typedie) == DW_TAG_array_type ||
+ dwarf_tag (typedie) == DW_TAG_pointer_type);
++indent;