<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/test/API/python_api/value, 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>Decent to Descent (#154040)</title>
<updated>2025-08-18T17:47:14+00:00</updated>
<author>
<name>LauraElanorJones</name>
<email>laura.elanor.jones@gmail.com</email>
</author>
<published>2025-08-18T17:47:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=350f4a3e3b0ebd9695f9c2194db5fd86ff551489'/>
<id>350f4a3e3b0ebd9695f9c2194db5fd86ff551489</id>
<content type='text'>
[lldb] Rename RecursiveDecentFormatter to RecursiveDescentFormatter (NFC)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[lldb] Rename RecursiveDecentFormatter to RecursiveDescentFormatter (NFC)</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Refactor away UB in SBValue::GetLoadAddress (#141799)</title>
<updated>2025-06-02T07:39:56+00:00</updated>
<author>
<name>Pavel Labath</name>
<email>pavel@labath.sk</email>
</author>
<published>2025-06-02T07:39:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e9fad0e91c49ca0f2669989dbad95664cbc9cbf3'/>
<id>e9fad0e91c49ca0f2669989dbad95664cbc9cbf3</id>
<content type='text'>
The problem was in calling GetLoadAddress on a value in the error state,
where `ValueObject::GetLoadAddress` could end up accessing the
uninitialized "address type" by-ref return value from `GetAddressOf`.
This probably happened because each function expected the other to
initialize it.

We can guarantee initialization by turning this into a proper return
value.

I've added a test, but it only (reliably) crashes if lldb is built with
ubsan.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The problem was in calling GetLoadAddress on a value in the error state,
where `ValueObject::GetLoadAddress` could end up accessing the
uninitialized "address type" by-ref return value from `GetAddressOf`.
This probably happened because each function expected the other to
initialize it.

We can guarantee initialization by turning this into a proper return
value.

I've added a test, but it only (reliably) crashes if lldb is built with
ubsan.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Add lookup by name to SBValue through new member property (#118814)</title>
<updated>2024-12-09T18:48:28+00:00</updated>
<author>
<name>Dave Lee</name>
<email>davelee.com@gmail.com</email>
</author>
<published>2024-12-09T18:48:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=53fd724b256e1ccfcb04c90f7740f54e1801986d'/>
<id>53fd724b256e1ccfcb04c90f7740f54e1801986d</id>
<content type='text'>
Introduces a `member` property to `SBValue`. This property provides pythonic access to a
value's members, by name. The expression `value.member["name"]` will be an alternate
form form of writing `value.GetChildMemberWithName("name")`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduces a `member` property to `SBValue`. This property provides pythonic access to a
value's members, by name. The expression `value.member["name"]` will be an alternate
form form of writing `value.GetChildMemberWithName("name")`.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Support true/false in ValueObject::SetValueFromCString (#115780)</title>
<updated>2024-11-13T05:18:22+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-11-13T05:18:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4714215efb0486682feaa3a99162e80a934be8f9'/>
<id>4714215efb0486682feaa3a99162e80a934be8f9</id>
<content type='text'>
Support "true" and "false" (and "YES" and "NO" in Objective-C) in
ValueObject::SetValueFromCString.

Fixes #112597</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Support "true" and "false" (and "YES" and "NO" in Objective-C) in
ValueObject::SetValueFromCString.

Fixes #112597</pre>
</div>
</content>
</entry>
<entry>
<title>Make ValueObject::Cast work for casts from smaller to larger structs in the cases where this currently can work. (#84588)</title>
<updated>2024-03-11T21:13:37+00:00</updated>
<author>
<name>jimingham</name>
<email>jingham@apple.com</email>
</author>
<published>2024-03-11T21:13:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3707c540d23a5684a1c37b0f7e41c1d8ed7f1f8a'/>
<id>3707c540d23a5684a1c37b0f7e41c1d8ed7f1f8a</id>
<content type='text'>
The ValueObjectConstResult classes that back expression result variables
play a complicated game with where the data for their values is stored.
They try to make it appear as though they are still tied to the memory
in the target into which their value was written when the expression is
run, but they also keep a copy in the Host which they use after the
value is made (expression results are "history values" so that's how we
make sure they have "the value at the time of the expression".)

However, that means that if you ask them to cast themselves to a value
bigger than their original size, they don't have a way to get more
memory for that purpose. The same thing is true of ValueObjects backed
by DataExtractors, the data extractors don't know how to get more data
than they were made with in general.

The only place where we actually ask ValueObjects to sample outside
their captured bounds is when you do ValueObject::Cast from one
structure type to a bigger structure type. In
https://reviews.llvm.org/D153657 I handled this by just disallowing
casts from one structure value to a larger one. My reasoning at the time
was that the use case for this was to support discriminator based C
inheritance schemes, and you can't directly cast values in C, only
pointers, so this was not a natural way to handle those types. It seemed
logical that since you would have had to start with pointers in the
implementation, that's how you would write your lldb introspection code
as well.

Famous last words...

Turns out there are some heavy users of the SB API's who were relying on
this working, and this is a behavior change, so this patch makes this
work in the cases where it used to work before, while still disallowing
the cases we don't know how to support.

Note that if you had done this Cast operation before with either
expression results or value objects from data extractors, lldb would not
have returned the correct results, so the cases this patch outlaws are
ones that actually produce invalid results. So nobody should be using
Cast in these cases, or if they were, this patch will point out the bug
they hadn't yet noticed.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ValueObjectConstResult classes that back expression result variables
play a complicated game with where the data for their values is stored.
They try to make it appear as though they are still tied to the memory
in the target into which their value was written when the expression is
run, but they also keep a copy in the Host which they use after the
value is made (expression results are "history values" so that's how we
make sure they have "the value at the time of the expression".)

However, that means that if you ask them to cast themselves to a value
bigger than their original size, they don't have a way to get more
memory for that purpose. The same thing is true of ValueObjects backed
by DataExtractors, the data extractors don't know how to get more data
than they were made with in general.

The only place where we actually ask ValueObjects to sample outside
their captured bounds is when you do ValueObject::Cast from one
structure type to a bigger structure type. In
https://reviews.llvm.org/D153657 I handled this by just disallowing
casts from one structure value to a larger one. My reasoning at the time
was that the use case for this was to support discriminator based C
inheritance schemes, and you can't directly cast values in C, only
pointers, so this was not a natural way to handle those types. It seemed
logical that since you would have had to start with pointers in the
implementation, that's how you would write your lldb introspection code
as well.

Famous last words...

Turns out there are some heavy users of the SB API's who were relying on
this working, and this is a behavior change, so this patch makes this
work in the cases where it used to work before, while still disallowing
the cases we don't know how to support.

Note that if you had done this Cast operation before with either
expression results or value objects from data extractors, lldb would not
have returned the correct results, so the cases this patch outlaws are
ones that actually produce invalid results. So nobody should be using
Cast in these cases, or if they were, this patch will point out the bug
they hadn't yet noticed.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][test] Modernize asserts (#82503)</title>
<updated>2024-02-21T19:02:30+00:00</updated>
<author>
<name>Jordan Rupprecht</name>
<email>rupprecht@google.com</email>
</author>
<published>2024-02-21T19:02:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9c2468821ec51defd09c246fea4a47886fff8c01'/>
<id>9c2468821ec51defd09c246fea4a47886fff8c01</id>
<content type='text'>
This uses [teyit](https://pypi.org/project/teyit/) to modernize asserts,
as recommended by the [unittest release
notes](https://docs.python.org/3.12/whatsnew/3.12.html#id3).

For example, `assertTrue(a == b)` is replaced with `assertEqual(a, b)`.
This produces better error messages, e.g. `error: unexpectedly found 1
and 2 to be different` instead of `error: False`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This uses [teyit](https://pypi.org/project/teyit/) to modernize asserts,
as recommended by the [unittest release
notes](https://docs.python.org/3.12/whatsnew/3.12.html#id3).

For example, `assertTrue(a == b)` is replaced with `assertEqual(a, b)`.
This produces better error messages, e.g. `error: unexpectedly found 1
and 2 to be different` instead of `error: False`.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Replace assertEquals with assertEqual (NFC) (#82073)</title>
<updated>2024-02-17T04:58:50+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-02-17T04:58:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=80fcecb13c388ff087a27a4b0e7ca3dd8c98eaa4'/>
<id>80fcecb13c388ff087a27a4b0e7ca3dd8c98eaa4</id>
<content type='text'>
assertEquals is a deprecated alias for assertEqual and has been removed
in Python 3.12. This wasn't an issue previously because we used a
vendored version of the unittest module. Now that we use the built-in
version this gets updated together with the Python version used to run
the test suite.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
assertEquals is a deprecated alias for assertEqual and has been removed
in Python 3.12. This wasn't an issue previously because we used a
vendored version of the unittest module. Now that we use the built-in
version this gets updated together with the Python version used to run
the test suite.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Fix Python test formatting (NFC)</title>
<updated>2024-02-16T06:54:00+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-02-16T06:53:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=096c530ab3ea5c96526451181117f30db17b4b1d'/>
<id>096c530ab3ea5c96526451181117f30db17b4b1d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Correct expected output for variable on 32 bit platforms</title>
<updated>2023-09-19T08:28:34+00:00</updated>
<author>
<name>David Spickett</name>
<email>david.spickett@linaro.org</email>
</author>
<published>2023-09-19T08:09:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=956860168b56f135b9facf3827ae9f3634d41f40'/>
<id>956860168b56f135b9facf3827ae9f3634d41f40</id>
<content type='text'>
710276a2505514634a7cc805461b1219dcef9337 added settings to control
leading zeros but the initial test case assumed a 64 bit target.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
710276a2505514634a7cc805461b1219dcef9337 added settings to control
leading zeros but the initial test case assumed a 64 bit target.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Fix the TestValueAPI test</title>
<updated>2023-09-18T17:57:25+00:00</updated>
<author>
<name>walter erquinigo</name>
<email>walter@modular.com</email>
</author>
<published>2023-09-18T17:56:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9389b056a604b7da9478bb40125d6a1ad379823a'/>
<id>9389b056a604b7da9478bb40125d6a1ad379823a</id>
<content type='text'>
This test was reported as failing by https://lab.llvm.org/buildbot/#/builders/68/builds/60172. The fix is very simple. We need to invoke the correct setting.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This test was reported as failing by https://lab.llvm.org/buildbot/#/builders/68/builds/60172. The fix is very simple. We need to invoke the correct setting.
</pre>
</div>
</content>
</entry>
</feed>
