sigtrap之后无法在GDB中逐步逐步逐步逐步启动程序
使用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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
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 viathread YOUR_THREAD_NUMBER
.