I just wrote out my installation process. I don't know some specific things in it, so I have any errors. if you know something, please let me know! To install vim with gdb, you need to re-compile and install vim; 1. I first uninstalled the existing vimi (I don't know if it is necessary to uninstall it, anyway...
I just wrote out my installation process. I don't know some specific things in it, so I have any errors. if you know something, please let me know!
To install vim with gdb, recompile and install vim;
1. I first uninstalled the existing vimi (I don't know if it is necessary to uninstall it, but I 've done it many times before, so I just uninstalled it. It's not clear ......)
(1). first:
Apt-get -- purge remove vim-common
Apt-get -- purge remove vim-tinny
(2) find vim in the software center and uninstall it.
2. preparations:
// Install the gtk environment to compile gvim
Sudo apt-get install gnome-core-devel
// Required for compilation
Sudo apt-get install build-essential
// If the following link cannot be opened or download failed, please google or directly go to the official website to find, official website: http://www.vim.org/
// Download vim,
Http://www.vim.org/download.php
// Download vimgdb
Https://github.com/larrupingpig/vimgdb-for-vim7.3
Note: This download file name is not a vimgdb-for-vim73, is a larrupingpig-vimgdb-for-vim7.3-bd07a6c, so you in the back decompression to change the name of the good, unzip the file to change the name, decompress also changed to vimgdb-for-vim73
3. installation:
(1) decompress and open the terminal cd to the Directory of the files downloaded just now.
Tar xjvf vim-7.3.tar.bz2-C/tmp
Tar xzvf vimgdb-for-vim7.3.tar.gz-C/tmp
Note: these are all decompressed on the terminal. you can also directly go to the directory you downloaded, right-click, decompress, and copy the decompressed file to/tmp.
(2) install the vimi patch with the gdb function
Cd/tmp
Patch-p0 <vimgdb-for-vim7.3/vim73.patch
(3). configure, compile, and install
Cd vim73/src
. /Configure -- enable-gui = gtk2 -- enable-tclinterp -- enable-CSTE -- enable-gdb -- enable-multibyte -- enable-xim -- enable-fontset -- with-features = huge prefix = /usr/local/share/vim
Make
Sudo make install
(4) copy some configuration files of vimgdb to. vim.
Cp-rf/tmp/vimgdb-for-vim7.3/vimgdb_runtime /*~ /. Vim
(5). generate a help document
Open gvim or vim
: Helptags ~ /. Vim/doc
Now, you can run the ": helpvimgdb" command to view the help information of vimgdb.
(6) run the viing provided by vimgdb
: Run macros/gdb_mappings.vim
(7) I have done all my work well. I can check the relevant information for the rest of my work. I have just installed it and will not use it --..........
If you want to debug a program, you need to turn it into a debug version. there is a parameter-g. please google to find out how to solve the problem ......
From the swust_long column