<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/source/Core/Statusline.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[lldb] Rework how we pass the execution context to the statusline (#159887)</title>
<updated>2025-09-23T21:18:11+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-09-23T21:18:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d136fbdf8cf626a446cc53345810d3f59b7e433c'/>
<id>d136fbdf8cf626a446cc53345810d3f59b7e433c</id>
<content type='text'>
Currently, we always pass the "selected" execution context to the
statusline. When handling a process or thread event, we can be more
precise, and build an execution context from the event data. This PR
also adopts the new `StoppedExecutionContext` that was recently
introduced.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, we always pass the "selected" execution context to the
statusline. When handling a process or thread event, we can be more
precise, and build an execution context from the event data. This PR
also adopts the new `StoppedExecutionContext` that was recently
introduced.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Take a sledgehammer approach to resizing the statusline (#146578)</title>
<updated>2025-07-03T17:21:49+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-07-03T17:21:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2f75f658b18aed4bbcab391063bceb7ccaf8a6ec'/>
<id>2f75f658b18aed4bbcab391063bceb7ccaf8a6ec</id>
<content type='text'>
Terminal resizing continues to be a source of statusline bugs, so much
so that some users have started disabling it altogether. Different
operating systems and terminal emulators exhibit subtly different
behaviors, making it nearly impossible to handle resizing reliably
across the board.

This patch sidesteps those issues by clearing the entire screen when the
terminal is resized. This avoids having to account for the previous,
potentially wrapped statusline, the underlying cause of many of the
aforementioned bugs.

The obvious downside is that this clears the on-screen history, but I
believe that’s a reasonable trade-off. Note that this only happens when
resizing the terminal; when launching LLDB, the statusline is drawn
without clearing the screen.

rdar://154778410</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Terminal resizing continues to be a source of statusline bugs, so much
so that some users have started disabling it altogether. Different
operating systems and terminal emulators exhibit subtly different
behaviors, making it nearly impossible to handle resizing reliably
across the board.

This patch sidesteps those issues by clearing the entire screen when the
terminal is resized. This avoids having to account for the previous,
potentially wrapped statusline, the underlying cause of many of the
aforementioned bugs.

The obvious downside is that this clears the on-screen history, but I
believe that’s a reasonable trade-off. Note that this only happens when
resizing the terminal; when launching LLDB, the statusline is drawn
without clearing the screen.

rdar://154778410</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Correctly restore the cursor column after resizing the statusline (#146132)</title>
<updated>2025-06-30T21:34:35+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-06-30T21:34:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1eb795413df3c38b688d42d6595a8e1503f6d139'/>
<id>1eb795413df3c38b688d42d6595a8e1503f6d139</id>
<content type='text'>
This PR ensures we correctly restore the cursor column after resizing
the statusline. To ensure we have space for the statusline, we have to
emit a newline to move up everything on screen. The newline causes the
cursor to move to the start of the next line, which needs to be undone.

Normally, we would use escape codes to save &amp; restore the cursor
position, but that doesn't work here, as the cursor position may have
(purposely) changed. Instead, we move the cursor up one line using an
escape code, but we weren't restoring the column.

Interestingly, Editline was able to recover from this issue through the
LineInfo struct which contains the buffer and the cursor location, which
allows us to compute the column. This PR addresses the bug by having
Editline "refresh" the cursor position.

Fixes #134064</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR ensures we correctly restore the cursor column after resizing
the statusline. To ensure we have space for the statusline, we have to
emit a newline to move up everything on screen. The newline causes the
cursor to move to the start of the next line, which needs to be undone.

Normally, we would use escape codes to save &amp; restore the cursor
position, but that doesn't work here, as the cursor position may have
(purposely) changed. Instead, we move the cursor up one line using an
escape code, but we weren't restoring the column.

Interestingly, Editline was able to recover from this issue through the
LineInfo struct which contains the buffer and the cursor location, which
allows us to compute the column. This PR addresses the bug by having
Editline "refresh" the cursor position.

Fixes #134064</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Use 1 based row and column for statusline (#143385)</title>
<updated>2025-06-10T08:59:16+00:00</updated>
<author>
<name>David Spickett</name>
<email>david.spickett@linaro.org</email>
</author>
<published>2025-06-10T08:59:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6ec48b449fb60a766d4faf185613f1b4a8638bfa'/>
<id>6ec48b449fb60a766d4faf185613f1b4a8638bfa</id>
<content type='text'>
I can't find a proper source for this but many materials say that ANSI
rows and columns start at 1 not 0.

https://www2.math.upenn.edu/~kazdan/210/computer/ansi.html is as good as
I can get:
```
&lt;row&gt; is a number from 1 through 25 that specifies the row to which the cursor is to be moved.
&lt;col&gt; is a number from 1 through 80 that specifies the column to which the cursor is to be moved.
```

0 does work in Windows terminal and Linux terminals, but we might as
well be correct and it's one less thing to reason about when auditing
this code.

From what I read, some terminals correct 0 back to 1 and some treat 0 as
a missing argument, which also defaults to 1.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I can't find a proper source for this but many materials say that ANSI
rows and columns start at 1 not 0.

https://www2.math.upenn.edu/~kazdan/210/computer/ansi.html is as good as
I can get:
```
&lt;row&gt; is a number from 1 through 25 that specifies the row to which the cursor is to be moved.
&lt;col&gt; is a number from 1 through 80 that specifies the column to which the cursor is to be moved.
```

0 does work in Windows terminal and Linux terminals, but we might as
well be correct and it's one less thing to reason about when auditing
this code.

From what I read, some terminals correct 0 back to 1 and some treat 0 as
a missing argument, which also defaults to 1.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Fix data race in statusline format handling (#142489)</title>
<updated>2025-06-04T02:12:30+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-06-04T02:12:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6760857bf3ad82a44c56d45a6a88a21b3fe521be'/>
<id>6760857bf3ad82a44c56d45a6a88a21b3fe521be</id>
<content type='text'>
This fixes a data race between the main thread and the default event
handler thread. The statusline format option value was protected by a
mutex, but it was returned as a pointer, allowing one thread to access
it while another was modifying it.

Avoid the data race by returning format values by value instead of by
pointer.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes a data race between the main thread and the default event
handler thread. The statusline format option value was protected by a
mutex, but it was returned as a pointer, allowing one thread to access
it while another was modifying it.

Avoid the data race by returning format values by value instead of by
pointer.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Remove unused escape code defines from status line (#141770)</title>
<updated>2025-05-28T16:29:59+00:00</updated>
<author>
<name>David Spickett</name>
<email>david.spickett@linaro.org</email>
</author>
<published>2025-05-28T16:29:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=caaca3298e4c08936d8f10df4ebc1749c8a66902'/>
<id>caaca3298e4c08936d8f10df4ebc1749c8a66902</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Make sure the process is stopped when computing the symbol context (#135458)</title>
<updated>2025-04-14T08:09:43+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-04-14T08:09:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=73b554d7a0a666e252f3c837510a55ee1acb1df5'/>
<id>73b554d7a0a666e252f3c837510a55ee1acb1df5</id>
<content type='text'>
Make sure the process is stopped when computing the symbol context. Both
Adrian and Felipe reported a handful of crashes in GetSymbolContext
called from Statusline::Redraw on the default event thread.

Given that we're handling a StackFrameSP, it's not clear to me how that
could have gotten invalidated, but Jim points out that it doesn't make
sense to compute the symbol context for the frame when the process isn't
stopped.

Depends on  #135455</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make sure the process is stopped when computing the symbol context. Both
Adrian and Felipe reported a handful of crashes in GetSymbolContext
called from Statusline::Redraw on the default event thread.

Given that we're handling a StackFrameSP, it's not clear to me how that
could have gotten invalidated, but Jim points out that it doesn't make
sense to compute the symbol context for the frame when the process isn't
stopped.

Depends on  #135455</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[lldb] Make sure the process is stopped when computing the symbol context (#134757)" (#135408)</title>
<updated>2025-04-11T18:50:42+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-04-11T18:50:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=179d30f8c3fddd3c85056fd2b8e877a4a8513158'/>
<id>179d30f8c3fddd3c85056fd2b8e877a4a8513158</id>
<content type='text'>
This reverts commit e84a80408523a48d6eaacd795f1615e821ffb233 because on
Linux there seems to be a race around GetRunLock. See #134757 for more
context.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit e84a80408523a48d6eaacd795f1615e821ffb233 because on
Linux there seems to be a race around GetRunLock. See #134757 for more
context.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Make sure the process is stopped when computing the symbol context (#134757)</title>
<updated>2025-04-08T18:06:05+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-04-08T18:06:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e84a80408523a48d6eaacd795f1615e821ffb233'/>
<id>e84a80408523a48d6eaacd795f1615e821ffb233</id>
<content type='text'>
Make sure the process is stopped when computing the symbol context. Both
Adrian and Felipe reported a handful of crashes in GetSymbolContext
called from Statusline::Redraw on the default event thread.

Given that we're handling a StackFrameSP, it's not clear to me how that
could have gotten invalidated, but Jim points out that it doesn't make
sense to compute the symbol context for the frame when the process isn't
stopped.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make sure the process is stopped when computing the symbol context. Both
Adrian and Felipe reported a handful of crashes in GetSymbolContext
called from Statusline::Redraw on the default event thread.

Given that we're handling a StackFrameSP, it's not clear to me how that
could have gotten invalidated, but Jim points out that it doesn't make
sense to compute the symbol context for the frame when the process isn't
stopped.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[dsymutil] Avoid copying binary swiftmodules built from textual"</title>
<updated>2025-04-08T16:49:36+00:00</updated>
<author>
<name>Adrian Prantl</name>
<email>aprantl@apple.com</email>
</author>
<published>2025-04-08T16:49:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2721d50d8785603987358afb4d82b986879ca41e'/>
<id>2721d50d8785603987358afb4d82b986879ca41e</id>
<content type='text'>
This reverts commit 39ace8a63012af7d6ad7bf065c233fd3d5df44a3.

while investigating Linux bot failures.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 39ace8a63012af7d6ad7bf065c233fd3d5df44a3.

while investigating Linux bot failures.
</pre>
</div>
</content>
</entry>
</feed>
