Exception Handling
Christopher Wright
dhasenan at gmail.com
Thu Aug 28 20:18:30 PDT 2008
Jarrett Billingsley wrote:
> "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?
Conversely, when do you explicitly want a lacok of debug information on
a crash? Maybe if you're distributing a super-secret closed source
application, but that's the only situation I can think of.
More information about the Digitalmars-d-learn
mailing list