Open ScoreUnder opened 2 years ago
I think gcc 12 defaults to DWARF 5, so using -gdwarf-4
might be what you need.
This still seems to be unrecognised:
$ gcc -gdwarf-4 -o test test.c
$ bloaty -d compileunits ./test
bloaty: Data is in new DWARF format we don't understand
I'm seeing something similar (building using clang 14), but I get the more specific failure "Don't know how to parse DWARF form: 39" (only when using compileunits).
Edit: This is only true for some of my executables, and the ones I'm trying are various test applications for our primary project (a large statically linked library). So, it's probably something that's specifically linked only into the failing executable (like one of our third party dependencies). If I track it down, I'll let you know.
The same for me
$ cd bloaty-1.1/
$ cmake .
$ make -j6
$ ./bloaty bloaty -d compileunits
bloaty: Data is in new DWARF format we don't understand
I used
gcc --help=common | perl -lne 'print $1 if /^\s*(-g[^\s<]+) /'
to get every possible debug flag fromgcc
, and did a full rebuild of my project with each one in succession. The-gz
option gavebloaty: premature EOF reading fixed-length DWARF data
, but every other option (including the absence of a debug option) gavebloaty: Data is in new DWARF format we don't understand
. This is on an x86_64 linux system compiling a project written in C using GCC 12.1.0. I haven't had much success with clang either (version 13.0.1).I am invoking it with
bloaty -d compileunits
followed by the name of the program. By default I build with-ggdb3
, and the other two documented modesbloaty
andbloaty -d symbols
seem to work fine with that.Is there a specific maximum version of gcc, or combination of debug parameters, which gets the compileunits option working?