What's the proper way to debug D programs with GDB?

Bernard Helyer b.helyer at gmail.com
Thu Mar 18 17:34:51 PDT 2010


On 19/03/10 12:32, Robert Clipsham wrote:
> On 18/03/10 23:22, Bernard Helyer wrote:
>> Okay got it. It's 6000 lines and six megabytes large (and hacked to all
>> hell, as the std.string templates started breaking, for some reason),
>> but it doesn't debug with `-gc`! What's the best way to get it to you?
>
> You can either upload it somewhere (eg http://omploader.org/ or some
> other file upload site if you've not got hosting), or email it to me (my
> address is the same as I use for the newsgroups). Either way if you
> tar/zip it up you should be able to save a few megs on that :)

http://omploader.org/iM3ZudA

There you go. D2, run build.debug.sh to build. Modify the script to add 
options and the like. Built with `-gc` list _Dmain or break _Dmain 
doesn't work, if you force a segfault (remove the comments from the 
first few lines of ator.main and compile with -noboundscheck to cause 
one) bt doesn't work, etc, etc.


More information about the Digitalmars-d-debugger mailing list