From d52761f89a1826b1cca29b1a63269eafe7197756 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 14 Jul 2009 17:57:16 -0700 Subject: 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 --- loc2c.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'loc2c.c') 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; -- cgit