can I check out the class definition from binary?
Dave Korn
dave.korn@artimi.com
Thu May 5 10:03:00 GMT 2005
----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....
More information about the Binutils
mailing list