LLDB tab filling for character names

I use lldb from the command line to debug a simple C program.

On my machine at work, I was able to use tabs for character names. For example, if I type "b ma", then Tab , it will be filled with a tab before "b main". The same goes for other functions.

However, I cannot make this function work on my laptop, where the actual tab (ASCII value 9) is inserted after the cursor. Both machines run 10.8.4 and have the latest Xcode.

Any ideas?

+6
source share
1 answer

I think you are using gdb on one of two systems.

lldb can execute a tab - this can make tab completion more difficult than gdb, but you need to use the canonical form of lldb commands to make it work. The b command you use is an alias (a regular expression alias is a list of regular expressions that try to parse your breakpoint command and do the right thing), which does not provide enough information about the completion of the lldb engine in the context of doing something.

Instead, if you were to do

 (lldb) br s -n ma<TAB> 

it will be autocomplete. This is the short form of breakpoint set --name , of course.

The lldb smart ability arises when you realize that lldb can insert many different arguments - breakpoint set --file file Tab completes the "file" as the file name. breakpoint set --selector will autocomplete selector names. breakpoint set --shlib (which limits the breakpoint only for a specific dylib / framework / binary) will be autocomplete with a list of dylibs / frameworks / binaries.

At some point in the future, we want to end the tab by working with alias commands such as b , but no one has managed to solve this problem.

+4
source

Source: https://habr.com/ru/post/951729/


All Articles