Gdb

在沒有幫助資訊的情況下啟動 GDB

  • July 15, 2022

每次啟動gdb,都會顯示如下資訊:

GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
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-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
--Type &lt;RET&gt; for more, q to quit, c to continue without paging--
<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".

我必須進入Enter才能繼續。這使我無法自動執行 gdb 腳本。有沒有辦法跳過幫助資訊?

是的--silent,添加選項

$ gdb --silent
>&gt;&gt;

引用自:https://unix.stackexchange.com/questions/709980