[all-commits] [llvm/llvm-project] 9c18ed: [lldb] Implement a statusline in LLDB (#121860)
Jonas Devlieghere via All-commits
all-commits at lists.llvm.org
Wed Mar 26 14:41:28 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9c18edc62123e778d1d713df44aa05c91e7bbbae
https://github.com/llvm/llvm-project/commit/9c18edc62123e778d1d713df44aa05c91e7bbbae
Author: Jonas Devlieghere <jonas at devlieghere.com>
Date: 2025-03-26 (Wed, 26 Mar 2025)
Changed paths:
M lldb/include/lldb/Core/Debugger.h
M lldb/include/lldb/Core/FormatEntity.h
M lldb/include/lldb/Core/IOHandler.h
A lldb/include/lldb/Core/Statusline.h
M lldb/include/lldb/Host/Editline.h
M lldb/packages/Python/lldbsuite/test/lldbtest.py
M lldb/source/Core/CMakeLists.txt
M lldb/source/Core/CoreProperties.td
M lldb/source/Core/Debugger.cpp
M lldb/source/Core/FormatEntity.cpp
M lldb/source/Core/IOHandler.cpp
A lldb/source/Core/Statusline.cpp
M lldb/source/Host/common/Editline.cpp
R lldb/test/API/functionalities/progress_reporting/TestTrimmedProgressReporting.py
A lldb/test/API/functionalities/statusline/Makefile
A lldb/test/API/functionalities/statusline/TestStatusline.py
A lldb/test/API/functionalities/statusline/main.c
Log Message:
-----------
[lldb] Implement a statusline in LLDB (#121860)
Add a statusline to command-line LLDB to display information about the
current state of the debugger. The statusline is a dedicated area
displayed at the bottom of the screen. The information displayed is
configurable through a setting consisting of LLDB’s format strings.
Enablement
----------
The statusline is enabled by default, but can be disabled with the
following setting:
```
(lldb) settings set show-statusline false
```
Configuration
-------------
The statusline is configurable through the `statusline-format` setting.
The default configuration shows the target name, the current file, the
stop reason and any ongoing progress events.
```
(lldb) settings show statusline-format
statusline-format (format-string) = "${ansi.bg.blue}${ansi.fg.black}{${target.file.basename}}{ | ${line.file.basename}:${line.number}:${line.column}}{ | ${thread.stop-reason}}{ | {${progress.count} }${progress.message}}"
```
The statusline supersedes the current progress reporting implementation.
Consequently, the following settings no longer have any effect (but
continue to exist to not break anyone's `.lldbinit`):
```
show-progress -- Whether to show progress or not if the debugger's output is an interactive color-enabled terminal.
show-progress-ansi-prefix -- When displaying progress in a color-enabled terminal, use the ANSI terminal code specified in this format immediately before the progress message.
show-progress-ansi-suffix -- When displaying progress in a color-enabled terminal, use the ANSI terminal code specified in this format immediately after the progress message.
```
Format Strings
--------------
LLDB's format strings are documented in the LLDB documentation and on
the website: https://lldb.llvm.org/use/formatting.html#format-strings.
The current implementation is relatively limited but various
improvements have been discussed in the RFC.
One such improvement is being to display a string when a format string
is empty. Right now, when launching LLDB without a target, the
statusline will be empty, which is expected, but looks rather odd.
RFC
---
The full RFC can be found on Discourse:
https://discourse.llvm.org/t/rfc-lldb-statusline/83948
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list