Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I edit the command-line in LLDB?

Tags:

c++

lldb

Is there any way to edit commands easily in lldb? For example gdb has readline support which means I can use vi keybindings to surf across the command line. Is there something similar for lldb?

like image 487
Daniel Avatar asked Oct 21 '25 03:10

Daniel


1 Answers

lldb uses editline rather than readline for command line editing. By default, editline comes up in an emacs-like mode, so using the arrow keys or ^a to go the beginning and ^e the end of a line. ^r searches backward in command history. If you're on macOS, Option-left & right arrow to go by word, etc...

editline has a vi mode as well (run man editrc for details). I've actually never used it however, so I don't know how well it works.

like image 191
Jim Ingham Avatar answered Oct 22 '25 19:10

Jim Ingham