Win32: How to get the stack trace when compiling with a windows subsystem?
Benjamin Thaut
code at benjamin-thaut.de
Mon Aug 19 00:50:18 PDT 2013
Am 18/08/2013 16:35, schrieb Andrej Mitrovic:
>
> $ dmd -g -L/SUBSYSTEM:WINDOWS:5.01 -run test.d && type stderr.log
> $ thr.info: null
>
> If I copy-paste the code from the module ctor into main then thr.info
> has the proper stack trace information.
>
> Should I be calling some runtime initialization functions in the
> module ctor so the stack traces work there?
>
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.
You might also create a bug ticket for this, because exceptions should
really have traces if they are thrown inside a module constructor.
Kind Regards
Benjamin Thaut
More information about the Digitalmars-d-learn
mailing list