🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# 设置命令提示符 ## 例子 $ gdb -q `which gdb` Reading symbols from /home/xmj/install/binutils-gdb-git/bin/gdb...done. (gdb) r -q Starting program: /home/xmj/install/binutils-gdb-git/bin/gdb -q [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". (gdb) ## 技巧 当你用gdb来调试gdb的时候,通过设置命令提示符,可以帮助你区分这两个gdb: $ gdb -q `which gdb` Reading symbols from /home/xmj/install/binutils-gdb-git/bin/gdb...done. (gdb) set prompt (main gdb) (main gdb) r -q Starting program: /home/xmj/install/binutils-gdb-git/bin/gdb -q [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". (gdb) 注意,这里`set prompt (main gdb) `结尾处是有一个空格的。 详情参见[gdb手册](https://sourceware.org/gdb/onlinedocs/gdb/Prompt.html#Prompt) ## 贡献者 xmj