-gc in dmd?

WebFreak001 d.forum at webfreak.org
Wed Apr 7 11:36:59 UTC 2021


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)


More information about the Digitalmars-d mailing list