-gc in dmd?

Andre Pany andre at s-e-a-p.de
Wed Apr 7 15:00:51 UTC 2021


On Wednesday, 7 April 2021 at 11:36:59 UTC, WebFreak001 wrote:
> Does DMD have a -gc flag comparable to the LDC flag? (emit C 
> compatible debug information)
>
> I thought it had that but seems like it doesn't exist actually. 
> I need it because the Visual Studio debugger (VSDBG) only works 
> with C/C++ style names and thinks arrays/associative arrays of 
> the form like int[] are illegal because of the []
>
> It's also only possible to add wildcards inside C++ style 
> template arguments (<T>) so something like slice<T> in LDC 
> would be nice to have.
>
> This would greatly improve the debugging experience on Windows 
> as then arrays and associative arrays could work with 
> visualizers. (like using the new natvis visualizer)
>
> Only being restricted to LDC with -gc might be a bad constraint 
> for some users, so I'm looking for something that works with 
> both compilers. mago-mi doesn't seem to work at all (running 
> works, no breakpoint support or anything else though)

Some years ago I got mago-mi working in IntelliJ D plugin, but 
yes, it was a try and error until I got the right order and 
syntax. Maybe this is a starting point:
https://github.com/rainers/mago/issues/14#issuecomment-395517912

You can also look at the DLangIde about the order and syntax of 
the commands in the debugger log output.

Kind regards
Andre



More information about the Digitalmars-d mailing list