This is the mail archive of the
mailing list for the elfutils project.
dwarf_aggregate_size() seems to fall over on pointer types
- From: Conrad Rad <cse dot cem at gmail dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Wed, 01 Oct 2014 13:15:51 -0400
- Subject: dwarf_aggregate_size() seems to fall over on pointer types
First, I'm not super familiar with DWARF, and perhaps this is a bug in
the DWARF information emitted by Clang (3.4). It's definitely a
difference between GCC and Clang DWARF output.
I've been fiddling with a pahole-alike tool that sits directly on
elfutils (as opposed to libdwarves, which hasn't been updated for some
time and doesn't handle some of the tags Clang emits). I've observed
that dwarf_aggregate_size() doesn't seem to like types that are
pointers or arrays of pointers.
I've compiled a small example program, repro, and output:
dwarf_aggregate_size() has no trouble with most member types, or even
pointer types on the output from GCC. However, it returns an error on
Perhaps Clang is just eliding pointer size information, assuming
consumers will consult the Elf machine class and infer?
Am I missing something? Is this a Clang bug or an elfutils bug?