GNU bug report logs -
#66604
[PATCH] Gud LLDB completions
Previous Next
Reported by: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Date: Wed, 18 Oct 2023 11:27:02 UTC
Severity: normal
Tags: patch
Fixed in version 30.1
Done: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 66604 <at> debbugs.gnu.org (full text, mbox):
Thank you! Maybe it's my old lldb version (lldb-1300.0.42.3, from Apple), but:
(lldb) script --language python -- def ff(): print("hello")
completes without error but somehow isn't evaluated properly (or in another namespace?) because:
(lldb) script --language python -- ff()
Traceback (most recent call last):
File "<input>", line 1, in <module>
NameError: name 'ff' is not defined
In contrast, evaluating expressions:
(lldb) script --language python -- abc = 123
(lldb) script --language python -- print(abc)
123
works as expected.
This means that gud-lldb-def-python-completion-function doesn't define gud_complete properly. However, if I change it to run in interactive mode:
(defvar gud-lldb-def-python-completion-function
(concat
- "script --language python -- "
+ "script --language python --\n"
"def gud_complete(c): "
"ci = lldb.debugger.GetCommandInterpreter(); "
"sl = lldb.SBStringList(); "
@@ -3948,7 +3948,8 @@ gud-lldb-def-python-completion-function
"print('gud-completions: ('); "
"[print(f'\"{sl.GetStringAtIndex(i)}\" ') "
" for i in range(sl.GetSize())]; "
- "print(')')")
+ "print(')')"
+ "\n\nexit()")
"LLDB command to define a Python function for completion.
Must be a single line.")
then it works. (This means that it no longer needs to be a single line and can use indentation and stuff.)
Another thing that is a bit annoying with the new lldb support is that every command sent to lldb is echoed:
(lldb) b exec_byte_code
b exec_byte_code <--- echo
Breakpoint 1: where = emacs`exec_byte_code ...
Surely that wasn't intended?
This bug report was last modified 1 year and 211 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.