在Linux中,退出GDB(GNU调试器)可以使用以下命令:
quit
命令:
在GDB命令行界面中输入quit
并按下回车键,即可退出GDB。quit
命令:
在GDB命令行界面中输入quit
并按下回车键,即可退出GDB。Ctrl+D
:
在GDB命令行界面中,按下Ctrl+D
组合键也可以退出GDB。save breakpoints
命令将断点保存到一个文件中。save breakpoints
命令将断点保存到一个文件中。save history
命令。save history
命令。假设你正在调试一个名为myprogram
的可执行文件,并且已经进入了GDB命令行界面:
$ gdb myprogram
GNU gdb (GDB) 10.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from myprogram...
(gdb)
要退出GDB,你可以输入:
(gdb) quit
或者按下Ctrl+D
。
通过这些方法,你可以轻松地退出GDB并返回到Linux命令行界面。
领取专属 10元无门槛券
手把手带您无忧上云