From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32451 invoked by alias); 22 Aug 2008 20:41:55 -0000 Received: (qmail 32442 invoked by uid 22791); 22 Aug 2008 20:41:54 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.113.40.141) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 22 Aug 2008 20:41:20 +0000 Received: from mailhost2.vmware.com (mailhost2.vmware.com [10.16.64.160]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 960B066DA; Fri, 22 Aug 2008 13:41:18 -0700 (PDT) Received: from [10.20.92.47] (promb-2s-dhcp47.eng.vmware.com [10.20.92.47]) by mailhost2.vmware.com (Postfix) with ESMTP id 777068E7C6; Fri, 22 Aug 2008 13:41:18 -0700 (PDT) Message-ID: <48AF23F7.1060100@vmware.com> Date: Mon, 25 Aug 2008 16:41:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: Stan Shebs CC: "gabe@blackfam.net" , "gdb@sourceware.org" Subject: Re: MSVC and DIA References: <8a15eb2b0808220949vffa9aaqe2c4c635857d83d7@mail.gmail.com> <48AEF67A.3000401@codesourcery.com> In-Reply-To: <48AEF67A.3000401@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-08/txt/msg00267.txt.bz2 Stan Shebs wrote: > Gabe Black wrote: >> GDB seems like a viable alternative, and all that seems to be missing >> is symbol interpretation. Microsoft provides the Debug Interface >> Access SDK (DIA) which I did not find referenced in any of the mailing >> lists. It is an SDK that allows you to get at any of the debug/symbol >> information in a PDB even if the format of the PDB changes. I would >> like to add PDB symbol support to GDB. I am fairly new to GDB but I >> have been able to implement the remote stub running on the target >> without much trouble. However the challenge lies in adding the symbol >> support. From what I understand, BFD is where I would need to add the >> PDB symbol support. I didn't find much about it in the gdb online >> documentation, both in the user manual and internal documentation. >> > Using somebody else's library can be a pain, because you have to adapt > every mismatched call on the fly, both at the BFD level (which is really > about symbols and blocks of data), and at the GDB level (which then > interprets the blocks of data as debug info). You might find it easier > to simply write a tool that translates a PDB file into an ELF+DWARF > file, then have GDB read that. Since you control every detail of output, > you needn't necessarily use BFD to write the file even; just dump out > canned sequences of bytes for the file as a whole, and similarly for the > DWARF equivalents of PDB constructs. Running GCC on Linux and doing -S > -dA (?) will give you annotated assembly code showing what GDB is going > to expect for different kinds of data, often easier than trying to grok > the whole DWARF spec. I've heard a surprising number if inquiries of this sort recently, folks wondering how they can use gdb to debug the output of microsoft compilers. I'm not getting anything by googling for "pdb to elf", "pdb to dwarf", or "microsoft to elf". Anybody think of any more good search terms?