如何在不停止 运行 程序的情况下关闭 gdb 连接

how to close gdb connection without stopping running program

有没有办法在不停止/退出 运行 程序的情况下退出 gdb 连接?我需要 运行 程序在 gdb 连接关闭后继续。

Is there a way to exit from gdb connnection without stopping / exiting running program ?

(gdb) help detach
Detach a process or file previously attached.
If a process, it is no longer traced, and it continues its execution.  If
you were debugging a file, the file is closed and gdb no longer accesses it.

List of detach subcommands:

detach checkpoint -- Detach from a checkpoint (experimental)
detach inferiors -- Detach from inferior ID (or list of IDS)

Type "help detach" followed by detach subcommand name for full documentation.
Type "apropos word" to search for commands related to "word".
Command name abbreviations are allowed if unambiguous.