dmd 1.061 and 2.046 release

bearophile bearophileHUGS at lycos.com
Fri May 14 15:15:47 PDT 2010


This release seems to work, thank you.

>Bugzilla 1001: print stack trace (in debug mode) when program die<

Can you or someone else show me an example of how to activate stack tracing?

For example on Windows I have written this small program:

import std.c.stdlib: atoi;
void main() {
    int x = atoi("0.0");
    int y = 10 / x;
}


I compile it with:
dmd -debug test.d

If I run it it prints:
object.Error: Integer Divide by Zero


This other program gives the same output:
import std.c.stdlib: atoi;
import core.runtime;
void main() {
    Runtime.traceHandler = &defaultTraceHandler;
    int x = atoi("0.0");
    int y = 10 / x;
}


Is this a Linux feature only for now, as Sean says in bug 1001? If so, then the changelog can specify it's a linux thing only.

Bye,
bearophile


More information about the Digitalmars-d-announce mailing list