Question

I'm trying to debug my first program in D compiled using

dmd -debug hello.d

but when I run the executable through GDB-7.6 it doesn't seem to know where to find the source code and decode the format of the stack trace (and its name-demangling).

Is GDB-debugging DMD-generated executables not yet supported or have I missed something?

Was it helpful?

Solution

The -debug flag means that debug code is enabled, which is not the same as having debug symbols. The flag you are looking for is -g or -gc.

See http://dlang.org/dmd-linux.html#switches for more info on the compiler flags.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top