Stack trace

New guy yahoo at yahoo.com
Wed Jun 12 07:39:28 PDT 2013


Ahh, looks like the stack trace is supported only in debug mode. 
-g option made the exception to spit out the function names.


$ rdmd -g t.d
object.Exception at t.d(5): in f1
----------------
0x0040CC9C in char[][] 
core.sys.windows.stacktrace.StackTrace.trace()
0x0040CB27 in core.sys.windows.stacktrace.StackTrace 
core.sys.windows.stacktrace.StackTrace.__ctor()
0x0040204C in void t.f1() at C:\test\t.d(6)
0x00402058 in void t.f2() at C:\test\t.d(10)
0x00402064 in void t.f3() at C:\test\t.d(14)
0x00402070 in _Dmain at C:\test\t.d(17)
0x00402BD8 in extern (C) int rt.dmain2._d_run_main(int, char**, 
extern (C) int function(char[][])*).void runMain()
0x00402C0E in extern (C) int rt.dmain2._d_run_main(int, char**, 
extern (C) int function(char[][])*).void runAll()
0x00402811 in _d_run_main
0x00402128 in main
0x754D33AA in BaseThreadInitThunk
0x76F09EF2 in RtlInitializeExceptionChain
0x76F09EC5 in RtlInitializeExceptionChain
----------------




More information about the Digitalmars-d-learn mailing list