Stack trace

New guy yahoo at yahoo.com
Wed Jun 12 07:26:23 PDT 2013


Could someone please tell me how can I get the stack trace when 
an exception is thrown? My test code:

Code: -------------------------------------------------

void f1() {
     throw new Exception("in f1");
}

void f2() {
     f1();
}

void f3() {
     f2();
}

void main() {
     f3();
}

Output: -------------------------------------------------

$ rdmd t.d
object.Exception at t.d(5): in f1
----------------
0x0040BC6C
0x0040BAF7
0x00402045
0x0040264E
0x00402251
0x00402074
0x754D33AA in BaseThreadInitThunk
0x76F09EF2 in RtlInitializeExceptionChain
0x76F09EC5 in RtlInitializeExceptionChain
----------------


I am expecting function names instead of some hex codes.

Thank you in advance.



More information about the Digitalmars-d-learn mailing list