Re: getting a stack trace from a c++ exception

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Jochen Kalmbach (nospam-Jochen.Kalmbach_at_holzma.de)
Date: 11/09/04


Date: Tue, 09 Nov 2004 04:48:17 -0800

Hi Chuck Bohling,

> Anyone know how to get a stack trace from a C++ exception? I'm using
> unmanaged C++.

If you have Debug-Symbols you can use

See: StackWalk64
http://msdn.microsoft.com/library/en-us/debug/base/stackwalk64.asp

Otherwise I would recomment to write an minidump and do look at the
callstack at your development machine.

Write the minidump by your own:

See; WriteDumpMiniDump
http://msdn.com/library/en-us/debug/base/minidumpwritedump.asp

or let "Dr. Watson" write the minidump
Call: "drwtsn32.exe -i"

See also my tool for writing minidumps/callstacks:
http://blog.kalmbachnet.de/?postid=13

-- 
Greetings
  Jochen
   My blog about Win32 and .NET
   http://blog.kalmbachnet.de/


Relevant Pages

  • Probleme beim Debuggen eines MiniDumps
    ... Von einem Kunden habe ich jetzt einen MiniDump, ... MyInvalidParameterHandler kommt. ... Der von WinDbg angezeigte Callstack ist nur zum Teil plausibel. ... MiniDumpWriteDump, GetCurrentProcessId, hFile, ...
    (microsoft.public.de.vc)
  • Was sagt mir dieser Call-Stack?
    ... ich untersuche gerade einen MiniDump - nur verstehe ich den ... Was kann diesen Callstack produzieren? ... "The consequence of this behavior is that you need to be very careful when re-throwing exceptions from the catch block in recursive or deep functions - you might hit stack overflow! ...
    (microsoft.public.de.vc)
  • Re: MiniDump - falsche "Absturz-Stelle"
    ... Wenn ich aber den MiniDump einlese (egal ob mit VS 2003 oder mit WinDbg), steht der CallStack an einer ganz anderen Stelle, viel weiter "hinten" in main. ... Laut MiniDump stürzt das Programm beim new-Openrator ab. ...
    (microsoft.public.de.vc)
  • Re: MiniDump - falsche "Absturz-Stelle"
    ... Wenn ich aber den MiniDump einlese (egal ob mit VS 2003 oder mit WinDbg), steht der CallStack an einer ganz anderen Stelle, viel weiter "hinten" in main. ...
    (microsoft.public.de.vc)
  • Re: Why the system is crashing?
    ... Frankly saying, at the moment I don't know how to obtain the callstack from minidump and besides that I don't want to bother you with my problem. ...
    (microsoft.public.development.device.drivers)