[Lldb-commits] [lldb] [SBProgress] Add swig support for `with` statement in Python (PR #133527)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Sat Mar 29 12:18:55 PDT 2025


JDevlieghere wrote:

> Neat! While I don't love the reverse video, is there an easier way to update the status line color other than setting the entire format like so?
> 
> ```
> settings set statusline-format "${ansi.bg.blue}{${target.file.basename}}{ | ${line.file.basename}:${line.number}:${line.column}}{ | ${thread.stop-reason}}{ | {${progress.count} }${progress.message}}"
> ```
> 
> If not, I'd love to contribute to make this a bit easier to update the color. Otherwise it's really neat!

Yup, that's the way to do it. I agree that the reverse video doesn't look "great", but it's the only thing that is guaranteed to look "alright" with any color scheme. I played around with the colors and there's always one color scheme where a combination of colors looks horrible. 

As to ways to make it easier to configure this, we generally have two ways to do this:

1. Using a prefix/suffix setting for things that don't take format strings. For example `show-progress-ansi-prefix` (now deprecated), `show-autosuggestion-ansi-prefix`, etc. The primary downside of that approach is that you have two settings.
2. Using a format strings so you can change the color of its components. For example `frame-format`, `thread-format`, etc. That's the approach I went with here as it follows the existing pattern, but it also allows you to have a different background color for things like the target, the stop reason, etc. Very similar to the `vim` statusline (and often folks do the same with tmux). 

What I was thinking is that maybe we could extend LLDB to have the notion of "themes". That would allow you to tweak the colors without changing any of the individual settings. Plus, it would ensure that colors remain consistent: if two things were originally one color, they'd both be the new color, rather than having you to go through all the settings and finding other instances of things being that color. 

https://github.com/llvm/llvm-project/pull/133527


More information about the lldb-commits mailing list