Win32: How to get the stack trace when compiling with a windows subsystem?

Andrej Mitrovic andrej.mitrovich at gmail.com
Mon Aug 19 02:57:38 PDT 2013


On 8/19/13, Benjamin Thaut <code at benjamin-thaut.de> wrote:
> D should be calling the module constructors in the correct order so that
> the windows stack trace module (core.sys.windows.stacktrace) is
> initialized first. If this is not the case you might need to import the
> module into your main file to make sure that it gets initialized first.

Thinking about it some more I think the .info field is empty because
there's nothing really to trace, if I write the whole exception via
writeln(thr) rather than writeln(thr.info), I'll get back the
file+line of the failed assert, which should be enough for a module
constructor (the Druntime function which ends up calling the actual
module ctors isn't really important here).


More information about the Digitalmars-d-learn mailing list