This is the mail archive of the
mailing list for the Cygwin project.
RE: Extracting Debug (meta data) from executable images?
- From: "Siegfried Heintze" <siegfried at heintze dot com>
- To: <cygwin at cygwin dot com>
- Date: Wed, 7 Dec 2005 22:17:41 -0700
- Subject: RE: Extracting Debug (meta data) from executable images?
>But "extracting debug info" is way too vague of a term to offer any
>meaningful help. You'd have to state exactly what you're trying to do.
>Try "man objdump" or "objdump -g file", or read the binutils/bfd
I basically want to implement reflection for C++ by extracting all the
metadata in the debug portion of the executable image to an xml file. Then I
can easily write programs that can enumerate all the data members of any
given struct or class. GDB can do this: too bad it produces C syntax instead
of XML. I don't want to parse C, it is too difficult.
I found a utility called gccxml which uses the gcc front end and dumps XML
for all the class and struct information. It is strange, however, because it
does not implement the -I switch that gcc does.
Neither nm, readelf or objdump enumerate the fields of a struct. It looks
like dwarfdump would, but libdwarf does not compile with cygwin/gcc 3.4 or
So if I download the source code for GDB, do I compile it on cygwin using
g++? I'd just need to modify the "info variables" and "ptype" commands to
emit XML instead of C.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html