September 23, 2013 Debugging support for D - wiki | ||||
---|---|---|---|---|
| ||||
I'm looking to begin adding integrated debugger support for the DDT IDE pretty soon. With this in mind it would be desirable to have a view of what level of D language debugger support is there for the various combinations of platform+compiler+debugger. This information would be quite beneficial to regular D users as well, as Manu's recent thread on the importance of a debugger is any indication of. Yet there doesn't seem to be any info about this in the wiki. The debuggers wiki page ( http://wiki.dlang.org/Debuggers ) doesn't even list the main players in this scene (VisualD/Mago, GDB, WinDebugger?) I might get started with this, but I would need to enlist the help of other people for the other platforms/debuggers I don't have proper acess to. The only combinations I tried so far was DMD+Windows+GDB, which seems like it's not supported at all. And GDC+Windows32+GDB which does seem to be well supported (GDB understands D name mangling, breakpoints in source, D data structures layout, etc.). I'm guessing GDC+GDB on Linux works just as well. (what about Mac though?) Several questions remain: Is debugger support with DMD+Linux+GDB as good as it is with GDC? For DMD+Windows, is there only good debugger support with VisualD? :-( And how well does that work with 32/64 bit platform variations? It would be great to have these answered, and going forward, keeping track of this info in the wiki. -- Bruno Medeiros - Software Engineer |
September 23, 2013 Re: Debugging support for D - wiki | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bruno Medeiros | What about Win64 and VS Debugger? |
September 23, 2013 Re: Debugging support for D - wiki | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bruno Medeiros | On 23 September 2013 20:50, Bruno Medeiros <brunodomedeiros+dng@gmail.com> wrote: > I'm looking to begin adding integrated debugger support for the DDT IDE pretty soon. With this in mind it would be desirable to have a view of what level of D language debugger support is there for the various combinations of platform+compiler+debugger. > > This information would be quite beneficial to regular D users as well, as Manu's recent thread on the importance of a debugger is any indication of. Yet there doesn't seem to be any info about this in the wiki. The debuggers wiki page ( http://wiki.dlang.org/Debuggers ) doesn't even list the main players in this scene (VisualD/Mago, GDB, WinDebugger?) > > > I might get started with this, but I would need to enlist the help of other people for the other platforms/debuggers I don't have proper acess to. > > The only combinations I tried so far was DMD+Windows+GDB, which seems like it's not supported at all. And GDC+Windows32+GDB which does seem to be well supported (GDB understands D name mangling, breakpoints in source, D data structures layout, etc.). I'm guessing GDC+GDB on Linux works just as well. (what about Mac though?) > GDB doesn't understand D mangling. We currently leverage the use of setting pretty-print names for debugging purposes, but you require to put the names in 'quotation.marks' - I will fix this sometime this year... maybe. :) -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0'; |
September 23, 2013 Re: Debugging support for D - wiki | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bruno Medeiros | On Monday, 23 September 2013 at 19:50:35 UTC, Bruno Medeiros wrote:
> Is debugger support with DMD+Linux+GDB as good as it is with GDC?
I could test with GDC and DMD on Linux (for GDB).
OTOG, simple quetsion: how to install/update DDT plugin to the git HEAD version?
|
September 24, 2013 Re: Debugging support for D - wiki | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bruno Medeiros | On 23.09.2013 21:50, Bruno Medeiros wrote: > For DMD+Windows, is there only good debugger support with VisualD? :-( > And how well does that work with 32/64 bit platform variations? Current options that I know of for Windows: - DMD/Win32+windbg(1996): This is a version of windbg from 1996 with very basic debugging support and is an embarrassment to be delivered with dmd. - DMD/Win32+cv2pdb: cv2pdb allows conversion of the (often no longer supported) CodeView 4 debug info into pdb files and makes debugging available by most C/C++ debuggers. This is also used by Visual D when using the VS debugger. You can see a list features that work or don't work here: http://dsource.org/projects/cv2pdb/wiki/Features For non-VS debuggers, most of the visualization extras for displaying strings, dynamic and associative arrays will not be available. - DMD/Win32+mago: mago is a debug engine for Visual Studio explicitely for D. Most notably, it has watch support for D expressions whereas in other debuggers you usually have to know the C-representation. It can be used with/without Visual D, but things like the "Auto" window only work with language support by Visual D. - DMD/Win64: dmd emits MS compatible debug information so that the appropriate PDB file is generated during linking and debugging is possible with most C/C++ debuggers. Debug info is not yet optimal, mostly because the VS debugger does not like '.' in names. (cv2pdb defaults to replacing it with '@'). - DMD/Win32+ddbg: ddbg is linked from the web site to http://ddbg.mainia.de/releases.html but this seems a dead link. Last time I tried ddbg some years ago it didn't work out too well for me (maybe it's mostly for D1). - GDC+cv2pdb: cv2pdb is also able to convert DWARF debug information to PDB files. As DWARF is more complex than (documented) CodeView debug information, expect some more quirks than with |
September 24, 2013 Re: Debugging support for D - wiki | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bruno Medeiros | On 2013-09-23 21:50, Bruno Medeiros wrote: > (what about Mac though?) The sate of debugging on Mac OS X is worse than on Linux. There are a couple of problems: * D symbols need to be prefixed with an extra underscore * The GDB system debugger is very old. It doesn't have the D patches the upstream GDB has. Apple is using LLDB as the new system debugger instead, which doesn't have any D patches at all * Line numbers don't work. Probably some issue with incorrect DWARF generated -- /Jacob Carlborg |
September 24, 2013 Re: Debugging support for D - wiki | ||||
---|---|---|---|---|
| ||||
Posted in reply to Iain Buclaw | On Monday, 23 September 2013 at 22:57:27 UTC, Iain Buclaw wrote:
>
> GDB doesn't understand D mangling. We currently leverage the use of
> setting pretty-print names for debugging purposes, but you require to
> put the names in 'quotation.marks' - I will fix this sometime this year... maybe. :)
Ah, is THAT what was wrong when I fired up my debugger? It would be super awesome if that were documented...somewhere. :/
-Wyatt
|
September 24, 2013 Re: Debugging support for D - wiki | ||||
---|---|---|---|---|
| ||||
Posted in reply to eles | On Monday, 23 September 2013 at 23:45:12 UTC, eles wrote:
> On Monday, 23 September 2013 at 19:50:35 UTC, Bruno Medeiros wrote:
> OTOG, simple quetsion: how to install/update DDT plugin to the git HEAD version?
Found that. Could you, please, tag the different releaseed versions, it is helpful when testing for regressions.
|
September 24, 2013 Re: Debugging support for D - wiki | ||||
---|---|---|---|---|
| ||||
Posted in reply to Wyatt | On 24 September 2013 14:31, Wyatt <wyatt.epp@gmail.com> wrote: > On Monday, 23 September 2013 at 22:57:27 UTC, Iain Buclaw wrote: >> >> >> GDB doesn't understand D mangling. We currently leverage the use of >> setting pretty-print names for debugging purposes, but you require to >> put the names in 'quotation.marks' - I will fix this sometime this year... >> maybe. :) > > > Ah, is THAT what was wrong when I fired up my debugger? It would be super awesome if that were documented...somewhere. :/ > > -Wyatt As an example, see how I'm using gdb here to get enum values. http://forum.dlang.org/post/mvbkskupmcllcjkmxegw@forum.dlang.org Regards -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0'; |
September 24, 2013 Re: Debugging support for D - wiki | ||||
---|---|---|---|---|
| ||||
On 24/09/13 00:57, Iain Buclaw wrote: > GDB doesn't understand D mangling. We currently leverage the use of > setting pretty-print names for debugging purposes, but you require to > put the names in 'quotation.marks' - I will fix this sometime this > year... maybe. :) When I asked about the possibility of adding D support on the Qt Creator mailing lists, one of my respondents remarked: > Last time I looked the debugging info produced by some D compilers was > pretty broken. E.g. DMD version 2.058 "encoded" the string[] type as > "_Array_uns long long". It's hard to base proper debugging on such > a foundation. ... are we talking about the same mangling issue here? |
Copyright © 1999-2021 by the D Language Foundation