gdb - 如何在交互式调试期间突出显示 gdb 输出并为其着色?

标签 gdb terminal colors

请不要回复我应该使用 ddd、nemiver、emacs、vim 或任何其他前端,我只是更喜欢 gdb,但希望看到它带有一些终端颜色的输出。

最佳答案

.gdbinit

您可以调整您的~/.gdbinit以具有颜色。您可以使用 mammon 的 .gdbinit,此处提供:

https://github.com/gdbinit/gdbinit

您也可以根据需要进行调整。我发现这个感谢 this SO answer 。以下是您可以获得的输出类型:

.gdbinit

GitHub 存储库也可用:https://github.com/gdbinit/Gdbinit

顺便说一句,applied to lldb 也有同样的想法。 .

GDB 仪表板

遵循相同的概念,GDB Dashboard为 Python 中的 GDB 提供模块化可视化界面。

GDB Dashboard

(无效)步行者

另一个类似的项目使用 GDB 的 Python 支持来提供更多的可扩展性,因此值得一试:https://github.com/dholm/voidwalker

@dholm 还提供了他自己的 .gdbinit受到上一篇的启发。

(void)walker

pwndbg

一些项目提供了一组有用的功能,包括改进的显示。 PEDA 就是这种情况。或pwndbg 。后者给出如下描述:

A PEDA replacement. In the spirit of our good friend windbg, pwndbg is pronounced pwnd-bag.

  • Speed
  • Resiliency
  • Clean code

它提供了与 PEDA 类似的命令来支持调试和漏洞开发,以及更好的显示(尽管这不是该项目的主要焦点)。该软件仍在开发中,尚未正式发布。

pwndbg

伏特龙

project描述状态:

Voltron is an extensible debugger UI for hackers. It allows you to attach utility views running in other terminals to your debugger (LLDB or GDB), displaying helpful information such as disassembly, stack contents, register values, etc, while still giving you the same debugger CLI you're used to.

您可以修改 .gdbinit 以自动集成它。但是,显示本身位于 GDB 之外(例如,在 tmux 拆分中)。

voltron

全局环境基金

GEF是另一种选择,其描述为:

It is aimed to be used mostly by exploiters and reverse-engineers, to provide additional features to GDB using the Python API to assist during the process of dynamic analysis and exploit development.

GEF

关于gdb - 如何在交互式调试期间突出显示 gdb 输出并为其着色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/209534/

相关文章:

assembly - 使用gdb作为监视器?

debugging - 使用 GCC 将程序的源代码嵌入到其二进制文件中以供 GDB 稍后使用

bash - 模糊搜索Shell命令?

command-line - Mac 终端 - 如果行长于窗口,命令行将被覆盖

excel - 使用 HSL 功能时如何修复 "Sub or Function not defined"

linux - 通过gdb手动唤醒epoll_wait?

gdb - 如何在gdb中打印-0x4(%rbp)?

ios - 弗兰克设置给出错误,

matlab - 为什么 kinect 颜色和深度不能正确对齐?

android - 上下文/覆盖主题颜色