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: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Nick Clifton'" <nickc at redhat dot com>,"'lin q'" <linq936 at hotmail dot com>
- Cc: <binutils at sources dot redhat dot com>
- Date: Thu, 5 May 2005 10:59:45 +0100
- Subject: RE: can I check out the class definition from binary?
----Original Message----
>From: Nick Clifton
>Sent: 05 May 2005 10:49
>> 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.
Or how about using GDB to display the type information ? The "ptype
CLASSNAME" command should help; at any rate, it should show what class info
appears to be there.
cheers,
DaveK
--
Can't think of a witty .sigline today....