菜单 学习猿地 - LMONKEY

VIP

开通学习猿地VIP

尊享10项VIP特权 持续新增

知识通关挑战

打卡带练!告别无效练习

接私单赚外块

VIP优先接,累计金额超百万

学习猿地私房课免费学

大厂实战课仅对VIP开放

你的一对一导师

每月可免费咨询大牛30次

领取更多软件工程师实用特权

入驻
39
0

vimgdb安装

原创
05/13 14:22
阅读数 48568
vimgdb install
**************
a) You need:

vim-7.3.tar.bz2                 http://www.vim.org/sources.php 

vimgdb-for-vim7.3 (this patch)   https://github.com/larrupingpig/vimgdb-for-vim7.3 

b) Untar all files, apply the patch and make Vim:

tar xjvf  vim-7.3.tar.bz2  -C /tmp

tar xzvf  vimgdb-for-vim7.3.tar.gz  -C /tmp

cd /tmp

patch  -p0 < vimgdb-for-vim7.3/vim73.patch

cd vim73/src

./configure --enable-gdb  --enable-cscope

make sudo make install IMPORTANT NOTE: you must run make (not .
/configure), and if you run ./configure then you must add the --enable-gdb command line argument in order to include the gdb feature (vimgdb) in vim. c) Install vimGdb runtime: Copy the file vimgdb_runtime found in the vimgdb tarball, to your runtime path. To find your runtime path location execute the vim command (this is usually $HOME/.vim): :set runtimepath? cp -rf /tmp/vimgdb-for-vim7.3/vimgdb_runtime/* ~/.vim Change to the doc directory, start Vim and run the ":helptags ." command to process the taglist help file. Without this step, you cannot jump to the taglist help topics. You can now use the ":help vimgdb" command to get the vimGdb documentation.

自带的说明比网上找的都好用

 

在.vimrc中添加

source ~/.vim/macros/gdb_mappings.vim

vimgdb使用:
1、run macros/gdb_mappings.vim
2、按键F7开启映射键对应关系
3、按空格开启gdb调试功能
4、使用file调入需要调试的文件
file ./libexec/mysqld
5、加一个断点 b xxx

6、开启运行 r

7、如何转为垂直分布

第一步:ctrl+w热键

第二步:shift+l

 

下载地方备份:

http://pan.baidu.com/s/1zMrq1

 

ctags:

生成tags

ctags -R

Ctrl+ ]跳到光标所在函数或者结构体的定义处
Ctrl+ T返回查找或跳转

比较好的文章:

http://easwy.com/blog/archives/advanced-vim-skills-cscope/

http://easwy.com/blog/archives/vim-cscope-ctags/

发表评论

0/200
39 点赞
0 评论
收藏