1

Is there a way to search LLDB commands similar to the readline library's history-search-backward in bash and GDB?

I want to be able to type some characters, and use up arrow to cycle through all commands that start with those characters.

ghostlygray
  • 21
  • 1
  • 2

1 Answers1

2

lldb uses editline rather than readline. Editline has a backward search in command history feature (em-inc-search-prev) that's bound to ^R by default (though you can change this in your .editrc) It works like emac's ^S, you type characters to refine the search, and ^R to go to the previous match. To reverse direction and start searching forward you would use em-inc-search-next, but we haven't bound that to anything.

Jim Ingham
  • 25,260
  • 2
  • 55
  • 63
  • 1
    One feature of readline that does not seem to be present in editline is the ability to only cycle through commands that start with a certain letter. Here's what I like to do: set breakpoints with `b `, and in gdb, type `b`, then up-arrow to cycle through previous breakpoints. If i do `b`, then ctrl-r, I have to cycle through all commands that contain a `b` in them, not just commands that start with `b`. Is there any way to do this? – ghostlygray Jan 15 '19 at 20:51