1

I'm trying to debug a sample code written in C++.

I load it into WinDbg and type uf main which should dissasemble the main function, but I get the error

0:000> uf main
Operation not supported by integrated managed debugging.
 error at 'main'

sos.dll and mscordacwks.dll are loaded. What can I do?

Thomas Weller
  • 55,411
  • 20
  • 125
  • 222
user42992
  • 163
  • 1
  • 3
  • 9
  • https://groups.google.com/forum/#!msg/microsoft.public.windbg/r2BvUe2mLhs/SSf2RJTgVBcJ – Hans Passant Jun 28 '15 at 07:48
  • I don't think C++ is considered managed code? – user42992 Jun 28 '15 at 17:01
  • Why would you load sos.dll and mscordacwks.dll when it is not managed code? – Hans Passant Jun 28 '15 at 17:03
  • I saw it suggested in several places, but didn't know what managed code was until after I'd loaded. Doesn't work either way. – user42992 Jun 28 '15 at 17:16
  • There is one version of WinDbg (6.7.5.0) which has .NET support built-in. What's the version number of your WinDbg? – Thomas Weller Jun 28 '15 at 21:46
  • Also, have you set up WinDbg to find the [symbols](http://stackoverflow.com/questions/30019889/how-to-set-up-symbols-in-windbg)? Please confirm that symbols are available by checking the output of the `lm`command. – Thomas Weller Jun 28 '15 at 21:49
  • 6.12.0002.633 is the version number. Output of lm: http://pastebin.com/raw.php?i=Si9XyqKX – user42992 Jun 28 '15 at 22:10
  • I can't reproduce your issue. Can you provide more detailed steps, e.g. how you loaded sos and mscordacwks? The error message though is still included in 6.12.2.633, so it might be possible to see it. It was removed in WinDbg 6.1. – Thomas Weller Jun 29 '15 at 18:18
  • I entered .load /path/to/sos.dll and .load /path/to/mscordacwks.dll. That's all. I also changed some settings in my compiler (Visual c++ 2008) to include debug symbols. – user42992 Jun 29 '15 at 19:00

1 Answers1

0

Compiled via VS command line. cl /Zi file.cpp Worked like a charm :)

user42992
  • 163
  • 1
  • 3
  • 9