!ClrStack - ASP.NET MVC应用程序中的调用显示

时间:2022-04-07 20:45:04

When attaching WinDbg to my ASP.NET MVC app and calling !ClrStack -a when an exception has occurred, I'm seeing no locals or params values. All I see is <NO DATA> appear.

当将WinDbg附加到我的ASP.NET MVC应用程序并在发生异常时调用!ClrStack -a时,我看不到本地或参数值。我只看到 出现。

Why is this happening? What settings in my project can I check?

为什么会这样?我可以检查项目中的哪些设置?

I appreciate I can see the objects in quesiton via a !dso call and finding the objects I'm interesting in the output, but that's not a good solution for me, since I need to know exactly the objects being passed into a specific function - I don't want to spend ages picking eah object address and doing a !do on them.

我很欣赏我可以通过!dso调用查看问题中的对象,并在输出中查找我感兴趣的对象,但这对我来说不是一个好的解决方案,因为我需要确切地知道传递给特定函数的对象 - 我不想花费多少时间选择对象地址并对它们进行操作。

The app is built in DEBUG mode. When viewing a stack, all the methods and types appear in the output, so I'm assuming there is no issue with symbols, though I'm willing to try any commands necessary to re-sync or update the symbols if required.

该应用程序以DEBUG模式构建。查看堆栈时,所有方法和类型都出现在输出中,所以我假设符号没有问题,但我愿意尝试任何必要的命令来重新同步或更新符号(如果需要)。

The CPU architecture is ANY CPU and we are running Windows Server 2008 R2 64-bit.

CPU架构是任何CPU,我们运行Windows Server 2008 R2 64位。

I tried using SOSEX's !mk !mframe and !mdv commands, to list param and locals, but they show <UNAVAILABLE>.

我尝试使用SOSEX的!mk!mframe和!mdv命令列出param和locals,但它们显示

EDIT:

编辑:

Here is an example of the type of output I'm seeing:

这是我看到的输出类型的示例:

!ClrStack  -  ASP.NET MVC应用程序中的调用显示

1 个解决方案

#1


1  

Why does this happen?

为什么会这样?

This happens for code optimized by the JIT compiler (your case) or release builds (by the compiler).

对于由JIT编译器(您的情况)或发布版本(由编译器)优化的代码,会发生这种情况。

What settings in my project can I check?

我可以检查项目中的哪些设置?

Always check the symbol path and add Microsoft symbols if not done yet.

如果尚未完成,请始终检查符号路径并添加Microsoft符号。

.symfix c:\debug\symbols
.reload

Next, check if WinDbg can find the symbols of your application using lm. It should show "private pdb symbols". If not, run

接下来,检查WinDbg是否可以使用lm找到应用程序的符号。它应该显示“私人pdb符号”。如果没有,请运行

.sympath+ <path to your PDBs>

Other than that, SOSEX makes your life easier. Try the following:

除此之外,SOSEX让您的生活更轻松。请尝试以下方法:

!mk; *** Managed stack
!mframe <frame>; *** Switch to frame
!mdv; *** Dump values - This will at least give you the type
!mdv <frame>; *** Same as before but include !mframe
!mdso; *** Similar to !dso

#1


1  

Why does this happen?

为什么会这样?

This happens for code optimized by the JIT compiler (your case) or release builds (by the compiler).

对于由JIT编译器(您的情况)或发布版本(由编译器)优化的代码,会发生这种情况。

What settings in my project can I check?

我可以检查项目中的哪些设置?

Always check the symbol path and add Microsoft symbols if not done yet.

如果尚未完成,请始终检查符号路径并添加Microsoft符号。

.symfix c:\debug\symbols
.reload

Next, check if WinDbg can find the symbols of your application using lm. It should show "private pdb symbols". If not, run

接下来,检查WinDbg是否可以使用lm找到应用程序的符号。它应该显示“私人pdb符号”。如果没有,请运行

.sympath+ <path to your PDBs>

Other than that, SOSEX makes your life easier. Try the following:

除此之外,SOSEX让您的生活更轻松。请尝试以下方法:

!mk; *** Managed stack
!mframe <frame>; *** Switch to frame
!mdv; *** Dump values - This will at least give you the type
!mdv <frame>; *** Same as before but include !mframe
!mdso; *** Similar to !dso