This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: can I check out the class definition from binary?
- From: Nick Clifton <nickc at redhat dot com>
- To: lin q <linq936 at hotmail dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 05 May 2005 10:49:25 +0100
- Subject: Re: can I check out the class definition from binary?
- References: <BAY10-F30C9B2870BA9C0A4FCD402E9180@phx.gbl>
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