<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/source/Breakpoint/BreakpointOptions.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] Support specifying a language for breakpoint conditions (#147603)</title>
<updated>2025-07-10T22:24:27+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-07-10T22:24:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f28a497a06c2d9202638d753e1cd2e247814d180'/>
<id>f28a497a06c2d9202638d753e1cd2e247814d180</id>
<content type='text'>
LLDB breakpoint conditions take an expression that's evaluated using the
language of the code where the breakpoint is located. Users have asked
to have an option to tell it to evaluate the expression in a specific
language.

This is feature is especially helpful for Swift, for example for a
condition based on the value in memory at an offset from a register.
Such a condition is pretty difficult to write in Swift, but easy in C.

This PR adds a new argument (-Y) to specify the language of the
condition expression. We can't reuse the current -L option, since you
might want to break on only Swift symbols, but run a C expression there
as per the example above.

rdar://146119507</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LLDB breakpoint conditions take an expression that's evaluated using the
language of the code where the breakpoint is located. Users have asked
to have an option to tell it to evaluate the expression in a specific
language.

This is feature is especially helpful for Swift, for example for a
condition based on the value in memory at an offset from a register.
Such a condition is pretty difficult to write in Swift, but easy in C.

This PR adds a new argument (-Y) to specify the language of the
condition expression. We can't reuse the current -L option, since you
might want to break on only Swift symbols, but run a C expression there
as per the example above.

rdar://146119507</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Fix trailing whitespace in Breakpoint (NFC)</title>
<updated>2025-07-08T22:38:45+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-07-08T22:35:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d9060794c20e9446f66be7c20d3c9fe57ba6d382'/>
<id>d9060794c20e9446f66be7c20d3c9fe57ba6d382</id>
<content type='text'>
Working in the Breakpoint library is a minefield if you have your editor
configured to trim trailing whitespace. Remove it and format the
affected lines.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Working in the Breakpoint library is a minefield if you have your editor
configured to trim trailing whitespace. Remove it and format the
affected lines.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Fix else-after-return in Breakpoint (NFC)</title>
<updated>2025-07-02T19:07:20+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-07-02T17:37:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ab0fa6c5dc725ef6f839ac8cea9b3a41aa3a5b75'/>
<id>ab0fa6c5dc725ef6f839ac8cea9b3a41aa3a5b75</id>
<content type='text'>
The LLVM Coding Standards [1] discourages the use of 'else' or 'else if'
after something that interrupts control flow. Bulk fix all instances as
I'm working on this part of LLDB.

[1] https://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The LLVM Coding Standards [1] discourages the use of 'else' or 'else if'
after something that interrupts control flow. Bulk fix all instances as
I'm working on this part of LLDB.

[1] https://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Store StreamAsynchronousIO in a unique_ptr (NFC) (#127961)</title>
<updated>2025-02-20T19:13:46+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-02-20T19:13:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=78d82d3ae7ac99833e1b9c0b529c256f90b6c6cc'/>
<id>78d82d3ae7ac99833e1b9c0b529c256f90b6c6cc</id>
<content type='text'>
Make StreamAsynchronousIO an unique_ptr instead of a shared_ptr. I tried
passing the class by value, but the llvm::raw_ostream forwarder stored
in the Stream parent class isn't movable and I don't think it's worth
changing that. Additionally, there's a few places that expect a
StreamSP, which are easily created from a StreamUP.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make StreamAsynchronousIO an unique_ptr instead of a shared_ptr. I tried
passing the class by value, but the llvm::raw_ostream forwarder stored
in the Stream parent class isn't movable and I don't think it's worth
changing that. Additionally, there's a few places that expect a
StreamSP, which are easily created from a StreamUP.</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>Add a unit test for SBBreakpoint::SetCallback (#96001)</title>
<updated>2024-06-24T16:50:42+00:00</updated>
<author>
<name>Chelsea Cassanova</name>
<email>chelsea_cassanova@apple.com</email>
</author>
<published>2024-06-24T16:50:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=347206f9570446340da6d7dadc13d10b0aac4528'/>
<id>347206f9570446340da6d7dadc13d10b0aac4528</id>
<content type='text'>
This commit adds a unit test for SBBreakpoint::SetCallback as it wasn't
being tested before.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds a unit test for SBBreakpoint::SetCallback as it wasn't
being tested before.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Change interface of StructuredData::Array::GetItemAtIndexAsString (#71613)</title>
<updated>2023-11-09T21:35:35+00:00</updated>
<author>
<name>Alex Langford</name>
<email>alangford@apple.com</email>
</author>
<published>2023-11-09T21:35:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1486264d5fad0ef7d76a44f6358390cf41218c7e'/>
<id>1486264d5fad0ef7d76a44f6358390cf41218c7e</id>
<content type='text'>
This patch changes the interface of
StructuredData::Array::GetItemAtIndexAsString to return a
`std::optional&lt;llvm::StringRef&gt;` instead of taking an out parameter.
More generally, this commit serves as proposal that we change all of the
sibling APIs (`GetItemAtIndexAs`) to do the same thing. The reason this
isn't one giant patch is because it is rather unwieldy changing just one
of these, so if this is approved, I will do all of the other ones as
individual follow-ups.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch changes the interface of
StructuredData::Array::GetItemAtIndexAsString to return a
`std::optional&lt;llvm::StringRef&gt;` instead of taking an out parameter.
More generally, this commit serves as proposal that we change all of the
sibling APIs (`GetItemAtIndexAs`) to do the same thing. The reason this
isn't one giant patch is because it is rather unwieldy changing just one
of these, so if this is approved, I will do all of the other ones as
individual follow-ups.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Add support for negative integer to {SB,}StructuredData</title>
<updated>2023-05-22T23:14:00+00:00</updated>
<author>
<name>Med Ismail Bennani</name>
<email>ismail@bennani.ma</email>
</author>
<published>2023-05-22T20:52:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1370a1cb5b97ecfc4fd2cb550159db9c9ebd3a68'/>
<id>1370a1cb5b97ecfc4fd2cb550159db9c9ebd3a68</id>
<content type='text'>
This patch refactors the `StructuredData::Integer` class to make it
templated, makes it private and adds 2 public specialization for both
`int64_t` &amp; `uint64_t` with a public type aliases, respectively
`SignedInteger` &amp; `UnsignedInteger`.

It adds new getter for signed and unsigned interger values to the
`StructuredData::Object` base class and changes the implementation of
`StructuredData::Array::GetItemAtIndexAsInteger` and
`StructuredData::Dictionary::GetValueForKeyAsInteger` to support signed
and unsigned integers.

This patch also adds 2 new `Get{Signed,Unsigned}IntegerValue` to the
`SBStructuredData` class and marks `GetIntegerValue` as deprecated.

Finally, this patch audits all the caller of `StructuredData::Integer`
or `StructuredData::GetIntegerValue` to use the proper type as well the
various tests that uses `SBStructuredData.GetIntegerValue`.

rdar://105575764

Differential Revision: https://reviews.llvm.org/D150485

Signed-off-by: Med Ismail Bennani &lt;ismail@bennani.ma&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch refactors the `StructuredData::Integer` class to make it
templated, makes it private and adds 2 public specialization for both
`int64_t` &amp; `uint64_t` with a public type aliases, respectively
`SignedInteger` &amp; `UnsignedInteger`.

It adds new getter for signed and unsigned interger values to the
`StructuredData::Object` base class and changes the implementation of
`StructuredData::Array::GetItemAtIndexAsInteger` and
`StructuredData::Dictionary::GetValueForKeyAsInteger` to support signed
and unsigned integers.

This patch also adds 2 new `Get{Signed,Unsigned}IntegerValue` to the
`SBStructuredData` class and marks `GetIntegerValue` as deprecated.

Finally, this patch audits all the caller of `StructuredData::Integer`
or `StructuredData::GetIntegerValue` to use the proper type as well the
various tests that uses `SBStructuredData.GetIntegerValue`.

rdar://105575764

Differential Revision: https://reviews.llvm.org/D150485

Signed-off-by: Med Ismail Bennani &lt;ismail@bennani.ma&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[LLDB][NFC][Reliability] Fix uninitialized variables from Coverity scan. Part 3</title>
<updated>2022-07-27T17:39:49+00:00</updated>
<author>
<name>Slava Gurevich</name>
<email>sgurevich@gmail.com</email>
</author>
<published>2022-07-26T21:18:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=24301569f080d60f644d7a69496596cbd65079ce'/>
<id>24301569f080d60f644d7a69496596cbd65079ce</id>
<content type='text'>
Improve LLDB reliability by fixing the following "uninitialized variables" static code inspection warnings from
scan.coverity.com/projects/llvm:

1355854, 1347549, 1316348, 1372028, 1431625,
1315634, 1315637, 1355855, 1364803, 1420505,
1420563, 1420685, 1366014, 1203966, 1204029,
1204031, 1204032, 1328411, 1325969, 1325968,
1374921, 1094809

Differential Revision: https://reviews.llvm.org/D130602
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Improve LLDB reliability by fixing the following "uninitialized variables" static code inspection warnings from
scan.coverity.com/projects/llvm:

1355854, 1347549, 1316348, 1372028, 1431625,
1315634, 1315637, 1355855, 1364803, 1420505,
1420563, 1420685, 1366014, 1203966, 1204029,
1204031, 1204032, 1328411, 1325969, 1325968,
1374921, 1094809

Differential Revision: https://reviews.llvm.org/D130602
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] BreakpointOptions::CommandData::CreateFromStructuredData - remove dead code + variable. NFCI.</title>
<updated>2022-02-27T11:33:14+00:00</updated>
<author>
<name>Simon Pilgrim</name>
<email>llvm-dev@redking.me.uk</email>
</author>
<published>2022-02-27T11:33:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=850bc76a356b050b92851ad5a6a8207da05685cd'/>
<id>850bc76a356b050b92851ad5a6a8207da05685cd</id>
<content type='text'>
The found_something bool is only ever read after it has always been set to true.

Looks to be a leftover debugging variable.

Fixes static analyzer warning: https://llvm.org/reports/scan-build/report-BreakpointOptions.cpp-CreateFromStructuredData-8-4055b9.html#EndPath
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The found_something bool is only ever read after it has always been set to true.

Looks to be a leftover debugging variable.

Fixes static analyzer warning: https://llvm.org/reports/scan-build/report-BreakpointOptions.cpp-CreateFromStructuredData-8-4055b9.html#EndPath
</pre>
</div>
</content>
</entry>
</feed>
