Im trying to get DWARF info from a C++ file using dwarfdump. The C++ file is very simple -
int foo();
I compile it by doing g++ -g -c test.cpp
. I then do dwarfdump test.o
, but for some reason I get
----------------------------------------------------------------------
File: test.o (x86_64)
----------------------------------------------------------------------
.debug_info contents:
< EMPTY >
Why is this? And how can I get my debug dwarf info?