gdb可视化

下载安装

  • PIP Package (Python Wheel)

You can install it from PyPi repository.

1
$ python3 -m pip install gdbfrontend
  • Arch Linux (AUR)****

You can install Arch Linux package for Arch-based distributions. (AUR Package)

1
$ yay -S gdb-frontend-bin
  • GIT (Latest GIT Snapshot)

You can download GDBFrontend from latest GIT snapshot.

1
2
3
$ git clone https://github.com/rohanrhu/gdb-frontend.git
$ cd gdb-frontend
$ ./gdbfrontend

更新vimrc(可跳过)

1
2
3
4
5
6
7
8
9
10
11
12
13
#1.进入配置
vi ~/.vimrc
#2.编写脚本:命令行模式:gdb来编译,调用gdbfrontend
func GDB()
let ffileName = bufname("%")
let fileName = strpart(ffileName, 0, strridx(ffileName, "."))
let curDir = getcwd()
exe "!clear && g++ -std=c++11 % -g -o" fileName
exe "!clear && gdbfrontend -G" curDir."/".fileName
endfunc
cmap gdb call GDB()<cr>
#3.更新配置
:source $MYVIMRC

使用

1
2
3
4
5
6
7
8
9
#1.测试文件
vi test.cpp
#2.something dumb
...
#3.测试
#如果有自定义函数
:gdb
#如果没有进入shell运行, <PATH>代表你的文件绝对路径
$ gdbfrontend -G <PATH>

使用效果

Donate
  • Copyright: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
  • Copyrights © 2020-2024 环烷烃
  • Visitors: | Views:

我很可爱,请我喝一瓶怡宝吧~

支付宝
微信