一般保护故障

发布于 2024-09-01 01:13:00 字数 20 浏览 1 评论 0原文

如何检测导致GPF的进程?

How to detect the process that caused a GPF?

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

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

发布评论

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

评论(1

旧人哭 2024-09-08 01:13:00

我不确定我是否理解你的问题。 GPF - 是处理器发出中断的情况。

如果这种情况发生在用户模式中 - 它会被转换为 SEH 异常,而该异常又可以由进程处理。如果不处理 - 进程就会“崩溃”。意味着 - 显示一个丑陋的消息框并且进程被终止(根据设置,进程也可能被调试,生成调试转储等)

如果这种情况发生在内核模式 - 有两种可能性。如果这种情况发生在允许异常的上下文中,则会引发并处理 SEH 异常(类似于用户模式)。但是,如果未处理异常,或者发生 GPF 的上下文不允许异常 - 操作系统将关闭,显示所谓的 BSOD(蓝屏死机)。

现在关于你的问题,我看到了几种可能性:

  • 操作系统死了,你想知道哪个进程进行了系统调用,导致内核模式下的 GPF。
    这可以通过附加的内核调试器来发现。您还将看到导致错误的驱动程序。
  • GPF 发生在进程内的用户模式中,并且不被处理。
    这个进程将会崩溃,你一定会知道那是哪个进程。
  • GPS 发生在流程内部,经过处理,流程继续运行。您希望收到有关此事的通知。
    为此,您可以使用调试器附加到进程。每当进程内部发生 SEH 异常时,操作系统就会通知调试器。

I'm not sure I understand your question. GPF - is the situation where a processor issues an interrupt.

If this happens in the user-mode - it's translated into a SEH exception, which in turn may be handled by the process. If it's not handled - the process "crashes". Means - an ugly message box is displayed and the process is terminated (depending on the settings the process may also be debugged, debug dump generated and etc.)

IF this happens in the kernel-mode - there're two possibilities. If this happened in a context of where exceptions are allowed - SEH exception is raised and handled (similarly to user-mode). If however the exception is not handled, or the context in which GPF happened doesn't allow exceptions - the OS shuts down, displaying the so-called BSOD (blue screen of death).

Now about your question, I see several possibilities:

  • OS dies, and you want to know which process made the system call which caused the GPF in the kernel mode.
    This is possible to discover with kernel debugger attached. You'll also see the driver that caused the error.
  • The GPF happens in the user-mode inside a process, and it's not handled.
    This process will crash, and you'll definitely know which process was that.
  • The GPS happens inside the process, handled, and the process continues to run. And you want to be notified about this.
    For this you can attach to the process with a debugger. Whenever a SEH exception occurs inside a process - the debugger is notified by the OS.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文