X-Spam-Check-By: sourceware.org From: "Siegfried Heintze" To: Subject: RE: Extracting Debug (meta data) from executable images? Date: Wed, 7 Dec 2005 22:17:41 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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/