<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/source/Interpreter/OptionValue.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] 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] Support programmatically setting the statusline format (NFC) (#135250)</title>
<updated>2025-04-10T22:36:28+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-04-10T22:36:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2b984fd0e396fe6ab30cd823ea2f65f33f75409c'/>
<id>2b984fd0e396fe6ab30cd823ea2f65f33f75409c</id>
<content type='text'>
Support programmatically setting the statusline format. I want to use
this API downstream, to change the statusline format for the Swift REPL.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Support programmatically setting the statusline format. I want to use
this API downstream, to change the statusline format for the Swift REPL.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Turn lldb_private::Status into a value type. (#106163)</title>
<updated>2024-08-27T17:59:31+00:00</updated>
<author>
<name>Adrian Prantl</name>
<email>aprantl@apple.com</email>
</author>
<published>2024-08-27T17:59:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0642cd768b80665585c8500bed2933a3b99123dc'/>
<id>0642cd768b80665585c8500bed2933a3b99123dc</id>
<content type='text'>
This patch removes all of the Set.* methods from Status.

This cleanup is part of a series of patches that make it harder use the
anti-pattern of keeping a long-lives Status object around and updating
it while dropping any errors it contains on the floor.

This patch is largely NFC, the more interesting next steps this enables
is to:
1. remove Status.Clear()
2. assert that Status::operator=() never overwrites an error
3. remove Status::operator=()

Note that step (2) will bring 90% of the benefits for users, and step
(3) will dramatically clean up the error handling code in various
places. In the end my goal is to convert all APIs that are of the form

`    ResultTy DoFoo(Status&amp; error)
`
to

`    llvm::Expected&lt;ResultTy&gt; DoFoo()
`
How to read this patch?

The interesting changes are in Status.h and Status.cpp, all other
changes are mostly

` perl -pi -e 's/\.SetErrorString/ = Status::FromErrorString/g' $(git
grep -l SetErrorString lldb/source)
`
plus the occasional manual cleanup.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch removes all of the Set.* methods from Status.

This cleanup is part of a series of patches that make it harder use the
anti-pattern of keeping a long-lives Status object around and updating
it while dropping any errors it contains on the floor.

This patch is largely NFC, the more interesting next steps this enables
is to:
1. remove Status.Clear()
2. assert that Status::operator=() never overwrites an error
3. remove Status::operator=()

Note that step (2) will bring 90% of the benefits for users, and step
(3) will dramatically clean up the error handling code in various
places. In the end my goal is to convert all APIs that are of the form

`    ResultTy DoFoo(Status&amp; error)
`
to

`    llvm::Expected&lt;ResultTy&gt; DoFoo()
`
How to read this patch?

The interesting changes are in Status.h and Status.cpp, all other
changes are mostly

` perl -pi -e 's/\.SetErrorString/ = Status::FromErrorString/g' $(git
grep -l SetErrorString lldb/source)
`
plus the occasional manual cleanup.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Add a deduction guides for scoped_lock in OptionValue.cpp &amp; ThreadList.cpp (NFC)</title>
<updated>2023-08-04T23:56:38+00:00</updated>
<author>
<name>Jie Fu</name>
<email>jiefu@tencent.com</email>
</author>
<published>2023-08-04T23:55:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=34fe58e0bc76eff973c9dd7daeddf13c38d184d9'/>
<id>34fe58e0bc76eff973c9dd7daeddf13c38d184d9</id>
<content type='text'>
/data/llvm-project/lldb/source/Interpreter/OptionValue.cpp:28:3: error: 'scoped_lock' may not intend to support class template argument deduction [-Werror,-Wctad-maybe-unsupported]
  std::scoped_lock lock(m_mutex, other.m_mutex);
  ^
/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/mutex:692:11: note: add a deduction guide to suppress this warning
    class scoped_lock
          ^
1 error generated.

/data/llvm-project/lldb/source/Target/ThreadList.cpp:739:5: error: 'scoped_lock' may not intend to support class template argument deduction [-Werror,-Wctad-maybe-unsupported]
    std::scoped_lock guard(GetMutex(), rhs.GetMutex());
    ^
/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/mutex:692:11: note: add a deduction guide to suppress this warning
    class scoped_lock
          ^
1 error generated.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
/data/llvm-project/lldb/source/Interpreter/OptionValue.cpp:28:3: error: 'scoped_lock' may not intend to support class template argument deduction [-Werror,-Wctad-maybe-unsupported]
  std::scoped_lock lock(m_mutex, other.m_mutex);
  ^
/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/mutex:692:11: note: add a deduction guide to suppress this warning
    class scoped_lock
          ^
1 error generated.

/data/llvm-project/lldb/source/Target/ThreadList.cpp:739:5: error: 'scoped_lock' may not intend to support class template argument deduction [-Werror,-Wctad-maybe-unsupported]
    std::scoped_lock guard(GetMutex(), rhs.GetMutex());
    ^
/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/mutex:692:11: note: add a deduction guide to suppress this warning
    class scoped_lock
          ^
1 error generated.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Protect OptionValue accesses from data races</title>
<updated>2023-08-04T22:33:46+00:00</updated>
<author>
<name>Augusto Noronha</name>
<email>augusto2112@me.com</email>
</author>
<published>2023-08-03T20:40:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=318f600722e3cc6745317bb68309f82656c97b27'/>
<id>318f600722e3cc6745317bb68309f82656c97b27</id>
<content type='text'>
Thread sanitizer is catching data races in OptionValue, protect accesses
to OptionValue with a mutex.

Differential Revision: https://reviews.llvm.org/D157041
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Thread sanitizer is catching data races in OptionValue, protect accesses
to OptionValue with a mutex.

Differential Revision: https://reviews.llvm.org/D157041
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][NFCI] Remove use of ConstString from OptionValue</title>
<updated>2023-07-06T15:49:07+00:00</updated>
<author>
<name>Alex Langford</name>
<email>alangford@apple.com</email>
</author>
<published>2023-07-03T19:55:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fc55b0b38446be8948a291057b3086b4a01fe0a7'/>
<id>fc55b0b38446be8948a291057b3086b4a01fe0a7</id>
<content type='text'>
Summary: No need to create a ConstString, `GetName` already returns a StringRef.

Reviewers: JDevlieghere, mib, jasonmolenda

Subscribers:

Differential Revision: https://reviews.llvm.org/D154386
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary: No need to create a ConstString, `GetName` already returns a StringRef.

Reviewers: JDevlieghere, mib, jasonmolenda

Subscribers:

Differential Revision: https://reviews.llvm.org/D154386
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Cleanup OptionValue header and implenentation (NFC)</title>
<updated>2023-05-15T03:30:29+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2023-05-15T03:20:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bf76a6e44723b73940ca81c3b17077225b3c4118'/>
<id>bf76a6e44723b73940ca81c3b17077225b3c4118</id>
<content type='text'>
Group related functions together and remove inconsistencies between them
in the implementation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Group related functions together and remove inconsistencies between them
in the implementation.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Complete OptionValue cleanup (NFC)</title>
<updated>2023-05-15T03:18:47+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2023-05-15T02:58:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3ebb33632a1509450fdbc1fb6a21107a0a513072'/>
<id>3ebb33632a1509450fdbc1fb6a21107a0a513072</id>
<content type='text'>
Make the `Get.*Value` and `Set.*Value` function private and migrate the
last remaining call sites to the new overloaded/templated functions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the `Get.*Value` and `Set.*Value` function private and migrate the
last remaining call sites to the new overloaded/templated functions.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Migrate to GetPropertyAtIndexAs for ArchSpec (NFC)</title>
<updated>2023-05-05T21:43:59+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2023-05-05T21:43:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=81f9c4323bb5828d21ba5c5f3d593e94b00fb744'/>
<id>81f9c4323bb5828d21ba5c5f3d593e94b00fb744</id>
<content type='text'>
Use the templated GetPropertyAtIndexAs helper for ArchSpec.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the templated GetPropertyAtIndexAs helper for ArchSpec.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Migrate to GetPropertyAtIndexAs for FileSpecList (NFC)</title>
<updated>2023-05-05T05:24:23+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2023-05-05T05:22:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=300dce986f656a2d787b8e882381f39746d2fc0a'/>
<id>300dce986f656a2d787b8e882381f39746d2fc0a</id>
<content type='text'>
Use the templated GetPropertyAtIndexAs helper for FileSpecList.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the templated GetPropertyAtIndexAs helper for FileSpecList.
</pre>
</div>
</content>
</entry>
</feed>
