How to get stack trace on Windows?

Nick Sabalausky a at a.a
Sun Jul 24 14:04:13 PDT 2011


"Andrej Mitrovic" <andrej.mitrovich at gmail.com> wrote in message 
news:mailman.1893.1311501384.14074.digitalmars-d-learn at puremagic.com...
> This is what works for me:
>
> module test;
>
> import std.stdio;
>
> void main()
> {
> foo();
> }
>
> void foo()
> {
>    bar();
> }
>
> void bar()
> {
>    assert(0);
> }
>
> D:\dev\code\d_code\dtrace>dmd -g test.d
>
> D:\dev\code\d_code\dtrace>cv2pdb test.exe
>
> D:\dev\code\d_code\dtrace>test
> core.exception.AssertError at test(17): Assertion failure
> ----------------
> D:\dev\code\d_code\dtrace\test.d(18): testbar
> D:\dev\code\d_code\dtrace\test.d(13): testfoo
> D:\dev\code\d_code\dtrace\test.d(7): D main
> ----------------
>
>> D:\dev\code\d_code\dtrace>cv2pdb
> Convert DMD CodeView debug information to PDB files, Version 0.19
>
> So it's v0.19, if that matters.
>
> Otherwise without cv2pdb I get only addresses.
>
> I got the latest dbghelp.dll from here:
> http://msdn.microsoft.com/en-us/windows/hardware/gg463009.aspx

Hmm I guess I must have forgotten to re-try the cv2pdb trick after I updated 
dbghelp.dll. That works now. Thanks.





More information about the Digitalmars-d-learn mailing list