This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

no DW_TAGs in readelf -w output


Hi,

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
-w.

I am using gcc 7.0.something on Linux and compiling with the -g
flag[1].  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.

Regards,

Amit

[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!  ]


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