This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/17959] Something (broken DWARF?) causes Systemtap to generate C code with uint0_t types


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]