How to get stack trace on Windows?

Dmitry Olshansky dmitry.olsh at gmail.com
Mon Jul 25 02:49:33 PDT 2011


On 25.07.2011 1:04, Nick Sabalausky wrote:
> "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.
>

Any idea why this trick is needed? For me it works as is, just wondering...

-- 
Dmitry Olshansky



More information about the Digitalmars-d-learn mailing list