delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
From: | "Siegfried Heintze" <siegfried AT heintze DOT com> |
To: | <cygwin AT cygwin DOT com> |
Subject: | RE: Extracting Debug (meta data) from executable images? |
Date: | Wed, 7 Dec 2005 22:17:41 -0700 |
MIME-Version: | 1.0 |
In-Reply-To: | <20051207212700.GC30968@trixie.casa.cgf.cx> |
Message-ID: | <30499572.1134019067348.JavaMail.SYSTEM@CCC-NOVA1> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
>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 >internals manuals. 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 RedHat8/gcc 3.2. 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. Siegfried -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |