summaryrefslogtreecommitdiffstats
path: root/loc2c.c
diff options
context:
space:
mode:
authorfche <fche>2007-06-15 20:12:46 +0000
committerfche <fche>2007-06-15 20:12:46 +0000
commitd6b380891ae8c1947f328ff7d7a0ddc7f5a13e08 (patch)
treea40b5a8eb7dd617f418fc20e5bd5c9fe29c415c1 /loc2c.c
parent78219af3821f92728b54ae7d7efeb28fdfbbc5ff (diff)
downloadsystemtap-steved-d6b380891ae8c1947f328ff7d7a0ddc7f5a13e08.tar.gz
systemtap-steved-d6b380891ae8c1947f328ff7d7a0ddc7f5a13e08.tar.xz
systemtap-steved-d6b380891ae8c1947f328ff7d7a0ddc7f5a13e08.zip
2007-06-15 Frank Ch. Eigler <fche@elastic.org>
PR 3331 cont'd. * loc2c.c (base_encoding): Tolerate absenece of DW_AT_encoding. (c_translate_pointer): Don't even try to find signedness, assume unsigned.
Diffstat (limited to 'loc2c.c')
-rw-r--r--loc2c.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/loc2c.c b/loc2c.c
index 79b864fd..bc209047 100644
--- a/loc2c.c
+++ b/loc2c.c
@@ -1240,8 +1240,9 @@ base_byte_size (Dwarf_Die *typedie, struct location *origin)
static Dwarf_Word
base_encoding (Dwarf_Die *typedie, struct location *origin)
{
- assert (dwarf_tag (typedie) == DW_TAG_base_type ||
- dwarf_tag (typedie) == DW_TAG_enumeration_type);
+ if (! (dwarf_tag (typedie) == DW_TAG_base_type ||
+ dwarf_tag (typedie) == DW_TAG_enumeration_type))
+ return -1;
Dwarf_Attribute attr_mem;
Dwarf_Word encoding;
@@ -1249,10 +1250,13 @@ base_encoding (Dwarf_Die *typedie, struct location *origin)
&& dwarf_formudata (&attr_mem, &encoding) == 0)
return encoding;
+ (void) origin;
+ /*
FAIL (origin,
N_("cannot get encoding attribute for type %s: %s"),
dwarf_diename (typedie) ?: "<anonymous>",
dwarf_errmsg (-1));
+ */
return -1;
}
@@ -1546,13 +1550,7 @@ c_translate_pointer (struct obstack *pool, int indent,
dwarf_diename (typedie) ?: "<anonymous>",
dwarf_errmsg (-1));
- Dwarf_Attribute encoding_attr;
- Dwarf_Word encoding;
- if (dwarf_attr_integrate (typedie, DW_AT_encoding, &encoding_attr) == NULL
- || dwarf_formudata (&encoding_attr, &encoding) != 0)
- encoding = base_encoding (typedie, *input);
- bool signed_p = (encoding == DW_ATE_signed
- || encoding == DW_ATE_signed_char);
+ bool signed_p = false; /* XXX: Does not matter? */
translate_base_fetch (pool, indent + 1, byte_size, signed_p, input, "addr");
(*input)->type = loc_address;