Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot use WinDbg and SOS in Visual Studio Immediate window

I'm following this tutorial: link. At step 8, when I say .load sos in the Immediate Window, it just pukes expected expression.

System: Win 7 x64, Visual Studio 2012 Premium. I have an installed Debugging Tools for Windows (x64) 11/14/2012, Now I installed X64 Debuggers And Tools. I have Windows SDK for Windows 7 (7.1). WinDbg.exe is in c:\Program Files\Debugging Tools for Windows (x64)\ and I can start it from start menu. However I cannot find sos.dll, which supposed to come with the Debugging Tools for Windows (x64).

How can I make this happen?

Bonus question: {,,kernel32}_LoadLibraryExW@12 in Step 4 doesn't work, I use {,,kernel32}LoadLibraryExW, but then I cannot figure out where is the loaded dll name. I was poking around with the registers.

like image 292
Csaba Toth Avatar asked Nov 03 '22 20:11

Csaba Toth


1 Answers

NTSD command support (MSDN) and Immediate Window Commands describe which WinDbg commands (or similar to WinDbg) are supported by Visual Studio 2005, 2008 and 2010. It's only a small subset:

.S
.X
.K
.U
.~
.Reload
.Sympath
.Cxr
.Exr
.Load
.Unload
.Unloadall

Most important is probably the .Load which allows loading extensions and then using ! commands of the extension.

It seems that support for WinDbg commands was dropped with VS 2012, since you cannot call the web page for VS versions higher than VS 2010.

like image 64
Thomas Weller Avatar answered Nov 11 '22 03:11

Thomas Weller