DConf 2014 Day 2 Talk 6: Debugging in D by Iain Buclaw
Manu via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Mon Jul 14 18:59:42 PDT 2014
On 15 July 2014 00:32, Johannes Pfau via Digitalmars-d-announce <
digitalmars-d-announce at puremagic.com> wrote:
> Am Tue, 15 Jul 2014 00:15:01 +1000
> schrieb Manu via Digitalmars-d-announce
> <digitalmars-d-announce at puremagic.com>:
>
> > I don't see that GDC/GDB will ever be useful in the Windows
> > environment due to incompatible object and debug formats, but LLVM
> > are making the push for full MSVC compatibility.
>
> Can you provide some more details about this? MinGW uses the standard
> PE object format, afaik. GCC-4.9 also supports SEH exceptions (on 64
> bit, not sure about 32). The mingw 'runtime' is a small layer on top of
> the microsoft runtime, to provide C99 functions and similar stuff. I
> don't think that should be a problem.
>
http://clang.llvm.org/docs/MSVCCompatibility.html
They emit line numbers so far apparently. But I understand the intent is to
properly populate the object with cv8 debug data.
The linker takes care of generating the pdb file.
So, are you saying that GDC binaries will link successfully against the
mscrt suite?
I've used it in the past, and it never wanted to link against the ms libs.
In addition, when I did try and link C and D code together, I got loads of
CRT conflicts when trying to link glibc and mscrt together.
I believe the goal for LLVM is to target the same runtime as MSC does,
otherwise you're just asking for link trouble.
The pdb debug format is not supported, AFAIK. But that format is not
> documented and I don't think you could add D extensions anyway.
> So does LLVM really support PDB?
>
The linker outputs the pdb file, the objects are populated with cv8. Can
GCC write cv8 output?
I'm sure it's possible to creatively coax the cv8 data blocks to store
non-MS data without being stripped or crashing the linker...
That said, I don't know anything about cv8/pdb, and if it's able to
sufficiently express D concepts as is. MS supports quite a few languages,
so it must be reasonably competent as it is...?
MinGW can use dwarf debug info on windows and I guess you get all
> benefits of Iain's gdb work on windows. It is annoying if you get
> crashes in the microsoft C runtime or any other library compiled with
> microsoft tools though, as there's no dwarf debug info for these.
>
I have had problems with the linker when trying to link GDC and MSC objects
together.
You lose the debug info for one or the other world. You can't have dwarf
and cv8/pdb together.
And to be useful, there would need to be some visual studio integration for
dwarf debugging :/
So overall I don't see why mingw should work fine on windows. Of
> course there's less incentive for GCC devs to support windows, but I
> doubt that's different for LLVM.
>
I think there would be plenty of incentive if it worked.
I haven't tried it out for a while. I'll give it a whirl and see what's
changed, but while the dwarf/cv8 conflict remains, I can't see it being a
practical solution.
There's also nobody working actively on the MinGW gdc port right now,
> afaik. We don't even know the test suite results for mingw. So if you
> want to contribute...
>
This has indeed been my biggest issue with GDC in the past.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-announce/attachments/20140715/efc32478/attachment.html>
More information about the Digitalmars-d-announce
mailing list