LLDB problem with TAB

Hi LLDB devs,

First I want to thank you all for the very helpful advice on my former question! It’s a really nice community.

I have a small problem now about LLDB tab completion and I haven’t found any solutions so far. I used to have nice tab completion before. But I cannot get this feature to work on my LLDB 7.0.1 on linux after I enable python, where an actual tab is inserted after the cursor and similar for other control characters like Backspace. Both in lldb console and the embedded python interpreter:
3203DB14@DEF03B5E.C19A705E.png

That’s very inconvenient. Is there anything wrong? I haven’t changed the code at all, just added some necessary parameters in cmake command to enable python. Things worked well even last week before rebuild with python

Kind regards,
Rui

Hi LLDB devs,

First I want to thank you all for the very helpful advice on my former question! It’s a really nice community.

I have a small problem now about LLDB tab completion and I haven’t found any solutions so far. I used to have nice tab completion before. But I cannot get this feature to work on my LLDB 7.0.1 on linux after I enable python, where an actual tab is inserted after the cursor and similar for other control characters like Backspace. Both in lldb console and the embedded python interpreter:
3203DB14@DEF03B5E.C19A705E.jpg

That’s very inconvenient. Is there anything wrong? I haven’t changed the code at all, just added some necessary parameters in cmake command to enable python. Things worked well even last week before rebuild with python

Kind regards,
Rui

The python interpreter may or may not support tab completion. On my mac, I just typed “python” and got the >>> and typed:

import json
json.lo

and I just have a TAB inserted into the output. So python might not have tab completion enabled by default? Checkout your python interpreter from the command line and let us know if it works?

Greg

It sounds like you aren’t getting completion anywhere, both in the python interpreter and in the regular lldb command line interpreter, is that right? If so, then it’s most likely you didn’t get link with libedit, which is what provides the tab completion, command line editing and the like. You can easily tell by attaching to your lldb with another lldb and running “image list”. You should see libedit in the list. If you don’t then that’s your problem… Without libedit support lldb just thinks it is talking to a dumb terminal, and can’t do anything smart with user input.

The lldb CMakery will try to find and use lib edit from your system. There are also cmake variables that control whether to link in libedit and where to find it. Anyway, likely something went wrong there.

Jim