sponsor Vim development Vim logo Vim Book Ad

minimal_gdb : lightweight vim->gdb broker. set and auto export breakpoints to gdb

 script karma  Rating 5/2, Downloaded by 711  Comments, bugs, improvements  Vim wiki

created by
Dmitry Ignatovich
 
script type
utility
 
description
Minimal gdb is a lightweight vim->gdb broker, that only allows you to set breakpoints in vim and automatically export them to gdb.


OFFICIAL GITHUB: https://github.com/mechatroner/minimal_gdb


You can't use the Minimal gdb for debugging inside vim windows, you have to start a separate gdb session, but all the breakpoints you've set will be magicaly (via .gdbinit actually) active in the debugger.
The main difference from other similiar gdb vim plugins, is that Minimal gdb uses the .gdbinit file for breakpoint export and doesn't allow in-window fully integrated debugging in vim. If some new breakpoints are set in vim after gdb startup, one has to run "syncbp" command in gdb or restart the debugger in order to import them.
The "syncbp" command will be added to gdb on the plugin first run via .gdbinit magic.

A typical use case looks like this:
    1. set some breakpoints in vim, they will be highlighted in the 'sign' column
    2. run gdb, which will automatically export the breakpoints from step 1.
    3. set some more breakpoints
    4. export them in gdb by using the new gdb "synbp" command, or by restarting the debugger (the former is easier).

INSTALLATION:
    Copy the files to your .vim folder or use Vundle.
    The script will configure everything when you set a first breakpoint

COMMANDS:
    In vim:
    MinGDBToggleBP or <leader>b - toggles a breakpoint.
    MinGDBDeleteAll - delete all breakpoints
    MinGDBRefreshFile - refresh breakpoints positions in a vim file. Use this in case something went wrong.

    In gdb:
    synbp - export new breakpoints from vim, which were set after gdb session has started.


REQUIREMENTS:
    gdb
    python 2.7
    vim compiled with python and signs features.


Tested with vim and gvim in linux and freebsd
 
install details
add mechatroner/minimal_gdb to your Vundle or manualy copy the files from the archive.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
minimal_gdb.tar.gz 1.0 2013-11-04 7.3 Dmitry Ignatovich Initial upload
ip used for rating: 18.221.85.33

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github