gdb - 使用 less 作为 gdb 寻呼机

标签 gdb

我注意到在 GDB 中,当发出带有长输出的命令时,如 info variables , 输出一次显示一页,按 enter往下走q退出。

是否可以将默认寻呼机替换为另一个寻呼机,例如 less ,以便我可以上下导航、退出、搜索等?

最佳答案

Is it possible to replace the default pager with another one



否:GDB 不会调用外部程序来显示输出,它只是在每个屏幕上暂停输出(您可以通过 set height 0 使其不暂停)。

除了跑里面emacs ,您也可以使用 screentmux (学习它们通常会在很多其他情况下对您有所帮助),或者让 GDB 记录输出( set logging on )然后在 gdb.txt 中搜索与任何 $PAGER你要。

关于gdb - 使用 less 作为 gdb 寻呼机,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16132163/

相关文章:

c++ - gdb:如何将共享库的日志文件重定向到 gdb 输出

assembly - 使用 gdb 检查寄存器的值

ios - 编译 iOS 静态库以解决 Adob​​e Native Extension 链接错误

gdb - 如何在GDB中打印指针内容?

python - 将 python -c 传递给 gdb 中运行的程序

c++ - 如何在 gdb 中列出类方法?

macos - OSX Catalina 上的 gdb 8.3.1 "not in executable format: file format not recognized"

c - 我想将 gdb 用于一个 c 文件,该文件具有类似 #include "config.h"的头文件?

c - 为什么 gdb "can' t compute CFA"when using a separate debug symbols file?

xcode - GDB 备忘单