This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/17959] Something (broken DWARF?) causes Systemtap to generate C code with uint0_t types
- From: "mjw at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Wed, 11 Feb 2015 21:18:29 +0000
- Subject: [Bug translator/17959] Something (broken DWARF?) causes Systemtap to generate C code with uint0_t types
- Auto-submitted: auto-generated
- References: <bug-17959-6586 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=17959
--- Comment #3 from Mark Wielaard <mjw at redhat dot com> ---
This seems to be caused by a "sizeless" pointer type.
The following quick hack seems to solve the issue:
diff --git a/loc2c.c b/loc2c.c
index aef999c..b179240 100644
--- a/loc2c.c
+++ b/loc2c.c
@@ -2132,7 +2132,7 @@ c_translate_pointer (struct obstack *pool, int indent,
Dwarf_Attribute attr_mem;
Dwarf_Word byte_size;
if (dwarf_attr_integrate (typedie, DW_AT_byte_size, &attr_mem) == NULL)
- byte_size = 0;
+ byte_size = max_fetch_size (*input, typedie);
else if (dwarf_formudata (&attr_mem, &byte_size) != 0)
FAIL (*input,
N_("cannot get byte_size attribute for type %s: %s"),
--
You are receiving this mail because:
You are the assignee for the bug.