How to get a full call stack in Visual Studio 2005?

How to get a full call stack for a C ++ application developed using Visual Studio 2005? I would like to have a complete call stack, including code in system libraries.

Do I need to change some settings in Visual Studio, or do I need to install additional software?

+4
source share
3 answers
  • Get debugging information for all project dependencies. This is indicated in the "Configuration Properties -> C / C ++ -> General" section of the project properties.

  • From the menu, go to "Tools → Options", then select "Debug → Symbols."

  • Add a new symbol location (folder icon) that points to the free Microsoft symbol server: symsrvsymsrv.dllc: \ symbols * http://msdl.microsoft.com/downloads/symbols "

  • Fill in the "cache symbols" field with a local place so that you do not go to the Internet all the time.

+6
source

Agree with Clay, but for Symbols Server you will get the latest version of symsrv.DLL from "Debugging for Windows", a free Microsoft download.

(Since you explicitly asked the question what you need to download, I assume that you do not have it yet)

0
source

Or, optionally (provided that Visual Studio is not installed), take a copy of Windows Debugging Tools , install and run the application from the debugger (windbg.exe), or bind it to an already running application:

windbg [.exe] -pn program.exe
or
windbg [.exe] -p process_id

A break in the debugger at the point you want to monitor the stack trace (Ctrl + Break). Switch to the thread of interest (most likely, the main thread of execution):

~ 0s

Fix characters for system modules (and possibly for the application, if available):

* Fix characters for the application
.sympath path_to_app_symbols
* configure where the debugger will load and store system characters
.symfix + path_where_system_symbols_will_be_stored
* force the debugger to reload characters
<i> .reload

Issue a call stack command:

<i> kb
0
source

Source: https://habr.com/ru/post/1276986/


All Articles