Skip to content

(lldb) prompt sometimes not printed on startup when statusline is enabled #134064

Open
@DavidSpickett

Description

@DavidSpickett

Sometimes when I start lldb with no arguments I get:

$ ./bin/lldb
<<< cursor points to the beginning of this line
< the status bar>

When it works correctly I get:

$ ./bin/lldb
(lldb) <<< cursor is one space beyond the prompt
<the status bar>

I tried various things like removing the history file, or quitting lldb with ctrl-d vs. the quit command. None of that made the behaviour consistent. So it could be some startup event finishing with different timings.

Adding a program file to the command line fixes this:

$ ./bin/lldb /tmp/test.o
(lldb) target create "/tmp/test.o"
Current executable set to '/tmp/test.o' (aarch64).
(lldb) << cursor one beyond the prompt
test.o << the status bar

Likely because this garauntees some update event to make the prompt print.

Could be platform specific, so here are host details:

$ arch
aarch64
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.5 LTS
Release:        22.04
Codename:       jammy
$ ldd ./bin/lldb
        linux-vdso.so.1 (0x0000ffff9ca7d000)
        liblldb.so.21.0git => /home/david.spickett/build-llvm-aarch64/./bin/../lib/liblldb.so.21.0git (0x0000ffff91450000)
        libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000ffff913b0000)
        libz.so.1 => /lib/aarch64-linux-gnu/libz.so.1 (0x0000ffff91380000)
        libstdc++.so.6 => /lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000ffff91150000)
        libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000ffff91120000)
        libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffff90f70000)
        libpython3.10.so.1.0 => /lib/aarch64-linux-gnu/libpython3.10.so.1.0 (0x0000ffff90990000)
        libpanel.so.6 => /lib/aarch64-linux-gnu/libpanel.so.6 (0x0000ffff90970000)
        libncurses.so.6 => /lib/aarch64-linux-gnu/libncurses.so.6 (0x0000ffff90930000)
        libtinfo.so.6 => /lib/aarch64-linux-gnu/libtinfo.so.6 (0x0000ffff908e0000)
        libform.so.6 => /lib/aarch64-linux-gnu/libform.so.6 (0x0000ffff908b0000)
        libxml2.so.2 => /lib/aarch64-linux-gnu/libxml2.so.2 (0x0000ffff906c0000)
        libedit.so.2 => /lib/aarch64-linux-gnu/libedit.so.2 (0x0000ffff90670000)
        liblzma.so.5 => /lib/aarch64-linux-gnu/liblzma.so.5 (0x0000ffff90630000)
        /lib/ld-linux-aarch64.so.1 (0x0000ffff9ca44000)
        libexpat.so.1 => /lib/aarch64-linux-gnu/libexpat.so.1 (0x0000ffff905f0000)
        libicuuc.so.70 => /lib/aarch64-linux-gnu/libicuuc.so.70 (0x0000ffff903e0000)
        libbsd.so.0 => /lib/aarch64-linux-gnu/libbsd.so.0 (0x0000ffff903b0000)
        libicudata.so.70 => /lib/aarch64-linux-gnu/libicudata.so.70 (0x0000ffff8e780000)
        libmd.so.0 => /lib/aarch64-linux-gnu/libmd.so.0 (0x0000ffff8e760000)
$ apt list --installed | grep curses

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libncurses-dev/jammy-updates,jammy-security,now 6.3-2ubuntu0.1 arm64 [installed,automatic]
libncurses5-dev/jammy-updates,jammy-security,now 6.3-2ubuntu0.1 arm64 [installed]
libncurses5/jammy-updates,jammy-security,now 6.3-2ubuntu0.1 arm64 [installed]
libncurses6/jammy-updates,jammy-security,now 6.3-2ubuntu0.1 arm64 [installed]
libncursesw6/jammy-updates,jammy-security,now 6.3-2ubuntu0.1 arm64 [installed]
ncurses-base/jammy-updates,jammy-security,now 6.3-2ubuntu0.1 all [installed]
ncurses-bin/jammy-updates,jammy-security,now 6.3-2ubuntu0.1 arm64 [installed]

Built lldb from 9b2fd1a.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions