sigtrap之后无法在GDB中逐步逐步逐步逐步启动程序

发布于 2025-01-24 02:37:58 字数 849 浏览 0 评论 0原文

使用mingw gdb,当我在运行时打破程序时(使用在mingw上,我如何使ctrl-c停止程序?),GDB无法从那里捡起。

我唯一能获得的返回式信息是

#0  0x00007fffbfccd881 in ntdll!DbgBreakPoint () from /c/WINDOWS/SYSTEM32/ntdll.dll
#1  0x00007fffbfcf99fb in ntdll!DbgUiRemoteBreakin () from /c/WINDOWS/SYSTEM32/ntdll.dll
#2  0x00007fffbd473034 in KERNEL32!BaseThreadInitThunk ()
   from /c/WINDOWS/System32/KERNEL32.DLL
#3  0x00007fffbfca1431 in ntdll!RtlUserThreadStart () from /c/WINDOWS/SYSTEM32/ntdll.dll
#4  0x0000000000000000 in ?? ()

,如果我尝试逐步完成我获得的程序

Single stepping until exit from function ntdll!DbgUiRemoteBreakin,
which has no line number information.

,并且程序可以完成。我能够正常(断点之后)踏上

Using mingw gdb, when I to break the program as it's running (using the method from In GDB on MinGW, how do I make Ctrl-C stop the program?), gdb fails to pick up from there.

The only backtrace information I can get is

#0  0x00007fffbfccd881 in ntdll!DbgBreakPoint () from /c/WINDOWS/SYSTEM32/ntdll.dll
#1  0x00007fffbfcf99fb in ntdll!DbgUiRemoteBreakin () from /c/WINDOWS/SYSTEM32/ntdll.dll
#2  0x00007fffbd473034 in KERNEL32!BaseThreadInitThunk ()
   from /c/WINDOWS/System32/KERNEL32.DLL
#3  0x00007fffbfca1431 in ntdll!RtlUserThreadStart () from /c/WINDOWS/SYSTEM32/ntdll.dll
#4  0x0000000000000000 in ?? ()

and if I try to step through the program I get

Single stepping until exit from function ntdll!DbgUiRemoteBreakin,
which has no line number information.

and the program runs to completion. I am able to step through normally (after a breakpoint) but I can't seem to get the debugger to recover from a SIGTRAP

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

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

发布评论

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

评论(1

吹泡泡o 2025-01-31 02:37:59

debugbreak breaks 创建一个新线程在目标过程,然后是通过断点例外来向调试器发出信号,以暂停执行。

您可以使用Info Threads列出所有可用线程,然后通过thread your_thread_number切换到另一个线程。

DebugBreakProcess creates a new thread in the target process, which is then signalling the debugger via a breakpoint exception to pause the execution.

You can list all available threads with info threads, and then switch to another thread via thread YOUR_THREAD_NUMBER.

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