GDB:不退出gdb的出口程序 [英] gdb: exit program without exiting gdb
问题描述
我调试用gdb的程序。首先,我负荷
我的可执行文件,然后我继续
来运行程序。我有时想打断我的程序的执行,所以我做的按Ctrl + C
。
I am debugging a program using gdb. First I load
my executable, then I continue
to run the program. I sometimes want to interrupt execution of my program, so I do Ctrl + C
.
我的问题是,这一关的两个的我的程序和gdb。我怎么能不退出gdb的退出我的程序?
My problem is that this closes both my program and gdb. How can I exit my program without exiting gdb?
推荐答案
看起来像在Windows下,你必须使用用CTRL-Break
不是控制-C
。看到这个页。
Looks like under Windows, you have to use Ctrl-Break
not Ctrl-C
. See this page.
摘录:
的MS-Windows程序调用SetConsoleMode关掉特殊
在`按Ctrl-C'按键的意义不能通过键入C-C中断。
因为这个原因,在MS-Windows的gdb支持C-作为
替代中断键序列,这可以用来中断
调试即使忽略C-C。
MS-Windows programs that call SetConsoleMode to switch off the special meaning of the `Ctrl-C' keystroke cannot be interrupted by typing C-c. For this reason, gdb on MS-Windows supports C- as an alternative interrupt key sequence, which can be used to interrupt the debuggee even if it ignores C-c.
这篇关于GDB:不退出gdb的出口程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!