Skip to content

cpiger/vgdb-vim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GDB Vim Frontend

Intro

VGdb is a gdb frontend plugin for Vim.

It both works on MS Windows and Linux.

It both works in gvim and vim.

It opens a VGDB window in vim that allows user to type gdb command directly, and gdb output is redirected to this windows.

Screenshot: Screenshot

For detail, read this vim help document vgdb-vim/doc/vgdb.txt

Installation

On Linux, run vgdb_install and specify path.

git clone https://github.com/cpiger/vgdb-vim
#cd vgdb-vim/src
#make, you will get libvgdbc.so
#cp ./libvgdbc.so /usr/lib64
#cp vgdb-vim/bin/vgdb /usr/local/bin/
#chmod a x /usr/local/bin/vgdb
#cp ./vgdb-vim $VIMFILES/

On MS Windows, you need install Perl (and of course gcc/gdb).

  1. install strawberry-perl-5.26.0.2-64bit.msi and make sure perl.exe in the default search path
  2. install tdm-gcc-5.1.0-3.exe and make sure gdb.exe in the default search path
  3. install sed-4.2.1-bin.zip and make sure sed.exe in the default search path
  4. git clone https://github.com/cpiger/vgdb-vim
  5. open windows command line cmd.exe as administrator privileges
  6. cd vgdb-vim/src
  7. mingw32-make, you will get vgdbc.dll
  8. copy vgdb vgdb.bat vgdbc.dll to your vim.exe/gvim.exe directory and make sure gvim.exe in the default search path
  9. copy vgdb-vim to $VIMFILES directory

Note:

  • gvim MUST in the default search path.

My dev environment:

Quick usage

In vim or gvim, run :VGdb command, e.g.

:VGdb
:VGdb cpp1
:VGdb cpp1 --tty=/dev/pts/4

To debug a perl program:

:VGdb hello.pl

The following shortcuts is applied that is similar to MSVC:

<F5> 	- run or continue
<S-F5> 	- stop debugging (kill)
<F10> 	- next
<F11> 	- step into
<S-F11> - step out (finish)
<C-F10>	- run to cursor (tb and c)
<F9> 	- toggle breakpoint on current line
<C-F9> 	- toggle enable/disable breakpoint on current line
\ju or <C-S-F10> - set next statement (tb and jump)
<C-P> 	- view variable under the cursor (.p)
<TAB>   - trigger complete 

Thanks

(https://github.com/skyshore2001/vgdb-vim)

About

visual gdb in vim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 59.7%
  • Perl 29.1%
  • C 6.9%
  • C 2.5%
  • Makefile 1.8%