Exception Handling

Jarrett Billingsley kb3ctd2 at yahoo.com
Wed Aug 27 22:29:47 PDT 2008


"Jarrett Billingsley" <kb3ctd2 at yahoo.com> wrote in message 
news:g95d2h$1ojq$1 at digitalmars.com...
> "sleek" <cslush at gmail.com> wrote in message 
> news:g94qsm$t5$1 at digitalmars.com...
>> Is there an easy way to get a stack trace when an exception is caught?
>>
>
> On Windows, you can run your program in ddbg, and it will print out a 
> stack trace when you get an exception (segfaults/stack overflows included) 
> as long as you compiled your program with debug symbols (-g).
>
> You can get it here: http://ddbg.mainia.de/releases.html
>
> You just use
>
> ddbg -cmd="r" myprog.exe
>
> on the commandline to load your program and immediately start running it.
>
> On linux... yeah I don't know.
>

The downside here of course being that it's an external program and not a 
library/part of the language, but hey, how often do you need a stack trace 
unless you're debugging? 




More information about the Digitalmars-d-learn mailing list