On Tue, Feb 15 2022, Greg Steuck <gne...@openbsd.org> wrote: > Andrei <andrei...@protonmail.com> writes: > >> The lldb(1) debugger was recently added in base and as I was playing around >> with it I noticed the lack of line editing functionality. >> >> This is because currently lldb is built without support for >> libedit. It would be nice to have libedit in base such to be able to >> link lldb against it, as the lack of line editing functionality makes >> it difficult to use. > > libedit is in base and gnu/usr.bin/clang/lldb/Makefile even links > lldb against libedit: > : LDADD+= -lcurses -ledit -lpanel > > Curiously, trying to enable libedit support in lldb with the following > patch didn't seem to help (arrow keys still show ^[[A and such). > > modified gnu/usr.bin/clang/include/lldb/Host/Config.h > @@ -41,7 +41,7 @@ > > #define CURSES_HAVE_NCURSES_CURSES_H 0 > > -#define LLDB_ENABLE_LIBEDIT 0 > +#define LLDB_ENABLE_LIBEDIT 1 > > #define LLDB_ENABLE_LIBXML2 0
Here's what the devel/llvm cmake build system defines. Editing in emacs mode (default) seems to work but I have tested very lightly so far. Works for you? ok? diff --git gnu/usr.bin/clang/include/lldb/Host/Config.h gnu/usr.bin/clang/include/lldb/Host/Config.h index 184c61330a6..3a07fd60667 100644 --- gnu/usr.bin/clang/include/lldb/Host/Config.h +++ gnu/usr.bin/clang/include/lldb/Host/Config.h @@ -9,9 +9,9 @@ #ifndef LLDB_HOST_CONFIG_H #define LLDB_HOST_CONFIG_H -#define LLDB_EDITLINE_USE_WCHAR 0 +#define LLDB_EDITLINE_USE_WCHAR 1 -#define LLDB_HAVE_EL_RFUNC_T 0 +#define LLDB_HAVE_EL_RFUNC_T 1 #define HAVE_SYS_TYPES_H 1 @@ -37,11 +37,11 @@ #define LLDB_ENABLE_LZMA 0 -#define LLDB_ENABLE_CURSES 0 +#define LLDB_ENABLE_CURSES 1 #define CURSES_HAVE_NCURSES_CURSES_H 0 -#define LLDB_ENABLE_LIBEDIT 0 +#define LLDB_ENABLE_LIBEDIT 1 #define LLDB_ENABLE_LIBXML2 0 -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE