Skip to content

Commit

Permalink
Customize disassembly; +LLrefresh
Browse files Browse the repository at this point in the history
  • Loading branch information
johncf committed Jul 21, 2015
1 parent e217281 commit 030e324
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions plugin/lldb.vim
Expand Up @@ -140,6 +140,7 @@ endfun
command! LLredraw call LLTabCheckClose() | call LLUpdateLayout()

nnoremap <M-b> :call LLBreakswitch(bufnr('%'), getcurpos()[1])<CR>
nnoremap <F5> :LLrefresh<CR>
nnoremap <S-F5> :LLredraw<CR>
nnoremap <F8> :LLcontinue<CR>
nnoremap <F9> :LLprint <C-R>=expand('<cword>')<CR>
Expand Down
7 changes: 6 additions & 1 deletion rplugin/python/lldb_ctrl/__init__.py
Expand Up @@ -126,6 +126,10 @@ def _complete(self, args):
def _exit(self, args):
self.ctrl.safe_exit()

@neovim.command('LLrefresh')
def _refresh(self):
self.ctrl.safe_call(self.ctrl.update_ui, [False, '!all'])

@neovim.command('LLrun', nargs='*')
def _run(self, args):
# FIXME: Remove in favor of `LLprocess launch` and `LLstart`?
Expand Down Expand Up @@ -171,7 +175,8 @@ def _continue(self, args):

@neovim.command('LLdisassemble', nargs='*', complete='custom,LLComplete')
def _disassemble(self, args):
self.ctrl.safe_execute("disassemble", args)
self.ctrl.safe_call(self.ctrl.do_disassemble, [' '.join(args)])
self.safe_vim_command('drop disassembly')

@neovim.command('LLexpression', nargs='*', complete='custom,LLComplete')
def _expression(self, args):
Expand Down
4 changes: 4 additions & 0 deletions rplugin/python/lldb_ctrl/controller.py
Expand Up @@ -177,6 +177,10 @@ def do_command(self, args):
if args.startswith('so'): # source
self.update_ui(buf='breakpoints')

def do_disassemble(self, args):
self.ui._content_map['disassembly'][1][1] = args
self.update_ui(buf='disassembly')

def do_breakswitch(self, bufnr, line):
""" Switch breakpoint at the specified line in the buffer. """
key = (bufnr, line)
Expand Down

0 comments on commit 030e324

Please sign in to comment.