“ [轻量级功能]”在调用堆栈中 [英] "[Lightweight Function]" in the call stack

查看:47
本文介绍了“ [轻量级功能]”在调用堆栈中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在调试程序(VS2008),并且正在逐步执行代码行。我碰到了一条正在调用委托函数的行,并且我尝试着一步。但是,没有像我期望的那样进入该方法,而是绕过了该方法,调试器改为进入了我认为是委托调用的函数。在调用堆栈中,我期望委托方法的行将以灰色显示,其内容为 [Lightweight Function]

I'm debugging a program (VS2008), and I was stepping through lines of code. I came across one line where a delegate function was being called, and I tried to step into it. However, rather than stepping into the method as I expected, the method was bypassed, with the debugger instead stepping into what I assume is a function called by the delegate. In the call stack, the line where I expected the delegate method to be is greyed out with the text [Lightweight Function].

轻量级功能部分是什么意思?有没有办法进入此功能?

What does the "Lightweight Function" part mean? Is there a way to step into this function?

推荐答案

我相信轻量级功能是指 DynamicMethod ,即在运行时发出,使用然后卸载的一种

I believe a lightweight function refers to a DynamicMethod, i.e. one that is emitted at runtime, used, and then unloaded.

此博客文章与Iron Python有关,但该信息对于任何.NET项目都应该是有用的:查看发射的IL 。作者向您展示了如何使用较低级别的调试器(windbg.exe)来查看这些轻量级函数。

This blog post is related to Iron Python, but the information should be good for any .NET project: Viewing Emitted IL. The author shows you how to use a lower level debugger (windbg.exe) to see these "lightweight functions."

这篇关于“ [轻量级功能]”在调用堆栈中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆