.Net - 什么是“放松”?

发布于 2024-08-17 00:40:09 字数 459 浏览 9 评论 0原文

在回答这个 问题 我注意到在处理异常时尝试移动“光标”时出现以下对话框:

无法将下一条语句设置到此位置。尝试展开调用堆栈失败。

在以下情况下无法展开:

  1. 调试是通过即时调试启动的。
  2. 放松正在进行中
  3. 抛出了 System.StackOverflowException 或 System.Threading.ThreadAbortException 异常。

到底什么是放松

While answering this question I noticed that I got the following dialog while atempting to move the "cursor" while an exception was being handled:

Unable to set the next statement to this location. The attempt to unwind the callstack failed.

Unwinding is not possible in the following scenarios:

  1. Debugging was started via Just-In-Time debugging.
  2. An unwind is in progress
  3. A System.StackOverflowException or System.Threading.ThreadAbortException exception has been thrown.

What exactly is an unwind?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

野稚 2024-08-24 00:40:10

CLR 在此处“展开”堆栈,以便找到带有可以处理异常的 catch 块的方法,即,如果当前方法不处理异常,则它会返回到调用它的方法以查看是否会处理异常。 。重复此过程,直到找到处理异常的方法或达到应用程序级别错误处理。

This where the CLR is 'unwinding' the stack in order to locate a method with a catch block that can handle the exception i.e. if the current method doesn't handle the exception it then returns to the method that called it to see if it will. This is repeated until it either finds a method to handle the exception or hits application level error handling.

九歌凝 2024-08-24 00:40:10

这意味着有一个错误的线程,或者可能是因为堆栈已满并且没有创建堆栈帧,在这种情况下,CLR 选择 UNWIND 当前上下文。

It means there is a faulty thread or probably that is because the stack is full and no stack frame is created, the CLR as opts to UNWIND the current context in this situation.

我只土不豪 2024-08-24 00:40:09

是我!

不,在这种情况下,它通常指的是在堆栈中逐步(“向后”/“向上”)的过程,删除连续的帧,直到回到所需的级别。典型的堆栈(当然)在结构上非常线性,帧是端到端堆叠的,因此实际上并没有太多字面展开,但这就是它的名称。

此维基百科页面有更多详细信息。

It's me!

No, in this context it typically refers to the process of stepping ("backwards"/"upwards") through a stack, removing successive frames until you've come back to the desired level. Typical stacks are (of course) very linear in their structure, frames are stacked end-to-end after each other, so there's not really much literal unwinding going on, but that's what it's called.

This Wikipedia page has more detail.

梅窗月明清似水 2024-08-24 00:40:09

展开只是将堆栈移回到堆栈上。

Unwinding is just moving back up the stack.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文