1

I'm trying to debug a C# application using SOSEX in WinDbg for 32 bit environment in .NET Framework 4.0. I use sosex.dll for 32 bit v4.0.

Here are the steps:

  1. sxe ld:mscorlib
  2. sxe ld:clrjit
  3. load Path to sosex.dll
  4. !mbp application.cs 34 (this sets breakpoint at line 34)

It works fine here.

However, when I start WinDbg fresh and attach to the C# application.exe process and do the necessary steps, the breakpoint doesn't work.

One thing I have observed is that the first time I ran the lm command in WinDbg, the output showed only application.exe.

But the next time, the lm command showed all the modules already loaded (clrjit, mscorlib, etc.)

Is this why the breakpoint isn't working?

4

1 回答 1

0

对于 SOSEX,上述步骤 1 和 2 是不必要的。如果从调试器启动应用程序,则可以使用!mbm!mbp从初始断点开始。

至于您的问题,位于application.cs第 34 行的是什么?这是入口点(主要)吗?听起来您在代码已经运行后试图中断。请附上您尝试中断时产生的所有调试器。这将有助于查明问题的原因。

于 2012-09-03T12:37:12.263 回答