Coder Social home page Coder Social logo

minimal_gdb's Introduction

Minimal gdb is a lightweight vim->gdb broker, that only allows you to set breakpoints in vim and automatically export them to 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

minimal_gdb's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.