Git Product home page Git Product logo

lldb.nvim's Introduction

LLDB Neovim Frontend

This plugin provides LLDB debugger integration for Neovim, featuring:

  • Buffers showing debugger state: backtrace, breakpoints etc.
  • Event-based, non-blocking UI
  • Breakpoints persistence across exits
  • Modal approach: define modes and replay commands during mode-switches
  • Tab-completion for LLDB commands

This plugin started out as a fork of https://github.com/gilligan/vim-lldb which was forked from http://llvm.org/svn/llvm-project/lldb/trunk/utils/vim-lldb/

A lot of refactoring, performance improvements, and many new features were added which would have been very hard (if not impossible) to implement as a standard Vim plugin.

This plugin takes advantage of Neovim's job API to spawn a separate process and communicates with the Neovim process using RPC calls.

Prerequisites

Installation

  1. Using a plugin manager such as vim-plug:

        Plug "critiqjo/lldb.nvim"
    

    Alternatively, clone this repo, and add the following line to your nvimrc:

        set rtp+=/path/to/lldb.nvim
    
  2. Execute:

        :UpdateRemotePlugins
    

    and restart Neovim.

Goals

The plugin is being developed keeping 3 broad goals in mind:

  • Ease of use: Users with almost zero knowledge of command line debuggers should feel comfortable using this plugin.
  • Completeness: Experienced users of LLDB should not feel restricted.
  • Customizability: Users should be able to bend this plugin to their needs.

Getting started

Here is a short screencast demonstrating the basics: GIF, Youtube

Also check out the getting started section from vim-docs (:h lldb-start). For easy navigation of docs, I suggest using viewdoc plugin by powerman.

General Discussion

Please leave a feedback at the gitter page: Join the chat at https://gitter.im/critiqjo/lldb.nvim

FAQ

After the recent update, [command] stopped working!

Have you tried :UpdateRemotePlugins and restarting Neovim? If you did, and the problem persists, please file a bug report (also see :help lldb-bugs).

The program counter is pointing to the wrong line in the source file at a breakpoint hit.

Try clang instead of gcc (fingers crossed). See clang comparison:

Clang does not implicitly simplify code as it parses it like GCC does. Doing so causes many problems for source analysis tools.

How do I attach to a running process?

To be able to attach, the "attacher" needs to have special permissions. The easiest method is to run a debug server as 'sudo' and connect to it. See the question below.

Remote debugging does not work!!

I haven't been able to get gdbserver, lldb-gdbserver or lldb-server gdbserver to work properly with the python API. But the following works; run:

# use sudo if you want to attach to a running process
$ lldb-server platform --listen localhost:2345

# in older versions of lldb, use this instead
$ lldb-platform --listen localhost:2345

The above command will start the server in platform mode and listen for connections on port 2345. Now, from the client (the plugin), run:

(lldb) platform select remote-linux
(lldb) platform connect connect://localhost:2345
(lldb) process attach --name cat

For more info on this, see Remote Debugging.

lldb.nvim's People

Contributors

critiqjo avatar dpwright avatar gilligan avatar gitter-badger avatar johncf avatar kennykaye avatar yorkie avatar

Watchers

 avatar  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.