Ddbg 0.0.4 alpha release

Jascha Wetzel "[firstname]" at mainia.de
Sat Mar 10 06:21:01 PST 2007


dmain2.d has another problem:
even with cr_trapExceptions=false, exceptions get handled. they just get
thrown again after being caught. therefore the stacktrace to the actual
location of the problem gets lost. with tango's dmain2.d the debugger
can only show the stacktrace to that throw statement, which is useless.
to fix this, the code needs to be more like the original dmain2, not
using a try/catch block at all, if cr_trapException=false.

Sean Kelly wrote:
> Jascha Wetzel wrote:
>> i thought about that first, so i wouldn't have to patch tango.
>> the problem is, that the linker strips cr_trapExeptions from the exe
>> unless it's called somewhere.
>> one could call it in main to initialize the variable, instead of
>> initializing it statically. but that would require a change as well.
>> maybe it's preferable to not have another export, though.
> 
> No problem.  I thought about this a bit more this morning and I think
> I'm just going expose the variable as you suggest.  It will either be
> named "trapExceptions" or "cr_trapExceptions" -- I haven't decided yet
> (but probably the former).
> 
> 
> 
> Sean



More information about the Digitalmars-d-announce mailing list