comp.lang.ada
 help / color / mirror / Atom feed
From: alby.gamper@gmail.com
Subject: Re: Visual Studio IDE - Integration
Date: Sun, 12 Feb 2017 02:26:33 -0800 (PST)
Date: 2017-02-12T02:26:33-08:00	[thread overview]
Message-ID: <9b622af9-a1f7-4bf7-a2ea-ee730e9ced8a@googlegroups.com> (raw)
In-Reply-To: <o7p655$qr6$1@gioia.aioe.org>

On Sunday, February 12, 2017 at 7:25:13 PM UTC+11, Dmitry A. Kazakov wrote:
> On 2017-02-12 01:49, alby.gamper@gmail.com wrote:
> 
> > I have managed to build a new RTS (libgnat) using the MS linker and a small test
> > Ada application that links against this RTS using the MS Linker. The bad news is
> > that all debug info is lost in the process. I believe the info is still in the
> > final exe, but the relevant DWARF ".debug_xxx" sections get renamed to 8 chars
> > by the MS linker and no longer usable/convertable !
> 
> Sorry, I don't know much about MS internals, but isn't it a pdb file 
> that contains debug information?
> 
> -- 
> Regards,
> Dmitry A. Kazakov
> http://www.dmitry-kazakov.de

Yes the PDB does contain the debug information, However it, as I understand it
produced by the linker (be it LD or MS link) based on both the symbolic info
in the underlying "o"/"obj" files and other debug info available in the O/obj
files such as source line number -> address translation/mapping (used to set
breakpoints etc...)

The issue with using MS Linker is that it does not understand the DWARF debug
info produced by the GCC compiler (and hence ignores it)

Their is a utility (open source) called cv2pdb that can take a GCC compiled and
linked app and produce a PDB, but the app must have been compiled/linked with
GCC as a starting point.

I believe a possible solution is

1) enable GCC to natively support/produce PDB debug info. The MS documentation
on the PDB format is now publically available, and as I understand it the LVVM
project (ie CLANG) can already produce either DWARF, CV or PDB debug info. This would entail developing a "debug hook" provider within the GCC source. Not a
trivial task

Your thoughts are welcome

Thanks Alex

  reply	other threads:[~2017-02-12 10:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-27 12:49 Visual Studio IDE - Integration alby.gamper
2017-01-27 13:12 ` Dmitry A. Kazakov
2017-01-27 13:51   ` alby.gamper
2017-02-06 18:36     ` Scott Loyd
2017-02-07  3:47       ` alby.gamper
2017-02-07  7:46         ` Hadrien Grasland
2017-02-07  8:37           ` Dmitry A. Kazakov
2017-02-08  3:41             ` alby.gamper
2017-02-12  0:49               ` alby.gamper
2017-02-12  8:25                 ` Dmitry A. Kazakov
2017-02-12 10:26                   ` alby.gamper [this message]
2017-02-03 18:09 ` Leff Ivanov
2017-02-04  3:14   ` alby.gamper
2017-02-07 14:00 ` Aurele
2017-02-12  1:50 ` Ivan Levashev
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox