This is the mail archive of the
mailing list for the binutils project.
no DW_TAGs in readelf -w output
- From: Amit Chaudhuri <amit dot k dot chaudhuri at gmail dot com>
- To: binutils at sourceware dot org
- Date: Wed, 29 Jan 2014 18:03:40 +0000
- Subject: no DW_TAGs in readelf -w output
- Authentication-results: sourceware.org; auth=none
after reading "Debugging using DWARF" by Michael J Eager I tried to
follow along with the examples at the end of the article using readelf
I am using gcc 7.0.something on Linux and compiling with the -g
flag. I thought that gcc would default to using DWARF (possibly
DWARF-4?) and that I'd see lots of debug sections and plenty of DW_TAG
and other phrases in the output. So I'm unclear what's going on.
[We're using native and cross compiled versions of gcc in case that
might have a bearing.]
If I systematically run through all of the -w<x> options, only one or
two of them output anything. Can anyone suggest what might be going
on? Is gcc defaulting to some sort of ultra-compact representation
based on DWARF or maybe using some other format?
Later on, I plan to run a few more systematic tests passing -g with
additional qualifiers to force particular debug formats and collect a
more structured set of notes together. Appreciate any pointers in
case I'm missing something obvious.
[actually - it looks like the -g is repeated for no good reason AND
-ggdb is also present between the other two. Reading the docs I am
unclear which flag wins! ]