can I check out the class definition from binary?
Nick Clifton
nickc@redhat.com
Thu May 5 09:51:00 GMT 2005
Hi Lin,
> I have a program built on Linux and having problem in debuging it in
> GDB. I am suspecting that its symbol table is not built as expected,
> meaning the debug info is not complete.
Why do you think that it is not complete ?
> I wonder how to use the binutils to check that. For example I now there
> is a class C1 defined in lib1.so, then how I can print out the
> definition? I just run "nm", but it only print out the names of the
> symbol table, it does not list the class definition.
If you are using the DWARF debug format then the answer is no. The
"readelf" program does have the ability to decode and display DWARF
debug information, but it will do so at a very low level, rather than
reconstructing high level information like class types.
If you are using the STABS debug format then you may be in luck. Try
using the "objdump" program with the "-g" switch. This may give you the
information that you are looking for, although you should be aware that
the STABS format has some limitations with respect to complex C++
classes and so it may not be able to provide you with all of the
information that you want.
Cheers
Nick
More information about the Binutils
mailing list