请不要回复我应该使用 ddd、nemiver、emacs、vim 或任何其他前端,我只是更喜欢 gdb,但希望看到它带有一些终端颜色的输出。
最佳答案
.gdbinit
您可以调整您的~/.gdbinit
以具有颜色。您可以使用 mammon 的 .gdbinit
,此处提供:
https://github.com/gdbinit/gdbinit
您也可以根据需要进行调整。我发现这个感谢 this SO answer 。以下是您可以获得的输出类型:
GitHub 存储库也可用:https://github.com/gdbinit/Gdbinit
顺便说一句,applied to lldb 也有同样的想法。 .
GDB 仪表板
遵循相同的概念,GDB Dashboard为 Python 中的 GDB 提供模块化可视化界面。
(无效)步行者
另一个类似的项目使用 GDB 的 Python 支持来提供更多的可扩展性,因此值得一试:https://github.com/dholm/voidwalker
@dholm 还提供了他自己的 .gdbinit受到上一篇的启发。
pwndbg
一些项目提供了一组有用的功能,包括改进的显示。 PEDA 就是这种情况。或pwndbg 。后者给出如下描述:
A PEDA replacement. In the spirit of our good friend
windbg
,pwndbg
is pronouncedpwnd-bag
.
- Speed
- Resiliency
- Clean code
它提供了与 PEDA 类似的命令来支持调试和漏洞开发,以及更好的显示(尽管这不是该项目的主要焦点)。该软件仍在开发中,尚未正式发布。
伏特龙
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 拆分中)。
全局环境基金
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.
关于gdb - 如何在交互式调试期间突出显示 gdb 输出并为其着色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/209534/