I'm just getting started with windbg/sos and I created a simple console application for testing (that throws an unhandled exception). It seems like after I load sos I will get an exception on the very next call.
For example:
ntsd consoleapplication1.exe
.symfix
.reload
g
.loadby sos clr
if I call:
!threads
"c0000005 Exception in C:\Windows\Microsoft.NET\Framework\v4.0.30319\sos.threads
PC: 592b7713 VA: 00000000 R/W: 0 Parameter: 00000000"
if I call:
!ClrStack
c0000005 Exception in C:\Windows\Microsoft.NET\Framework\v4.0.30319\sos.ClrStack
PC: 592b7713 VA: 00000000 R/W: 0 Parameter: 00000000
Every call after my 1st call will work (it's only the first call that fails after loading SOS).
I tried this recommendation and recompiled my code with native code debugging enabled but it did not make a difference.
Version of windbg: 6.3.9600.16384 X86