<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.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] Reimplment PyRun_String using the Python stable C API (#151761)</title>
<updated>2025-08-01T22:27:14+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-08-01T22:27:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=df392b518b7e187f72c036a611feca75ea8b796b'/>
<id>df392b518b7e187f72c036a611feca75ea8b796b</id>
<content type='text'>
Reimplement `PyRun_String` using `Py_CompileString` and`
PyEval_EvalCode`, which are part of the stable C API.

Part of #151617</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reimplement `PyRun_String` using `Py_CompileString` and`
PyEval_EvalCode`, which are part of the stable C API.

Part of #151617</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Make Python &gt;= 3.8 required for LLDB 21 (#124735)</title>
<updated>2025-01-29T09:56:41+00:00</updated>
<author>
<name>David Spickett</name>
<email>david.spickett@linaro.org</email>
</author>
<published>2025-01-29T09:56:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9ea64dd8781328d831d7c69a586f0c84dece1c11'/>
<id>9ea64dd8781328d831d7c69a586f0c84dece1c11</id>
<content type='text'>
As decided on
https://discourse.llvm.org/t/rfc-lets-document-and-enforce-a-minimum-python-version-for-lldb/82731.

LLDB 20 recommended `&gt;= 3.8` but did not remove support for anything
earlier. Now we are in what will become LLDB 21, so I'm removing that
support and making
`&gt;= 3.8` required.

See https://docs.python.org/3/c-api/apiabiversion.html#c.PY_VERSION_HEX
for the format of PY_VERSION_HEX.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As decided on
https://discourse.llvm.org/t/rfc-lets-document-and-enforce-a-minimum-python-version-for-lldb/82731.

LLDB 20 recommended `&gt;= 3.8` but did not remove support for anything
earlier. Now we are in what will become LLDB 21, so I'm removing that
support and making
`&gt;= 3.8` required.

See https://docs.python.org/3/c-api/apiabiversion.html#c.PY_VERSION_HEX
for the format of PY_VERSION_HEX.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Use PY_VERSION_HEX to simplify conditional compilation (NFC) (#114346)</title>
<updated>2024-10-31T15:46:35+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-10-31T15:46:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9ce0a61bdbf13d4d0f2e13e1bb6e7a4bb9d01858'/>
<id>9ce0a61bdbf13d4d0f2e13e1bb6e7a4bb9d01858</id>
<content type='text'>
Use PY_VERSION_HEX to simplify conditional compilation depending on the
Python version.

This also adds a static_assert to lldb-python to error out with a
meaningful diagnostic when you try building LLDB with an older Python
version in preparation for [1].

[1]
https://discourse.llvm.org/t/rfc-lets-document-and-enforce-a-minimum-python-version-for-lldb/82731/15</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use PY_VERSION_HEX to simplify conditional compilation depending on the
Python version.

This also adds a static_assert to lldb-python to error out with a
meaningful diagnostic when you try building LLDB with an older Python
version in preparation for [1].

[1]
https://discourse.llvm.org/t/rfc-lets-document-and-enforce-a-minimum-python-version-for-lldb/82731/15</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][test] Fix PythonDataObjectsTest</title>
<updated>2024-02-22T06:59:03+00:00</updated>
<author>
<name>Jordan Rupprecht</name>
<email>rupprecht@google.com</email>
</author>
<published>2024-02-22T06:59:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=675791335285fa86434dc46e5c92f543e0e79d19'/>
<id>675791335285fa86434dc46e5c92f543e0e79d19</id>
<content type='text'>
This is using `FileSystem::Instance()` w/o calling `FileSystem::Initialize()`. Use `SubsystemRAII` to do that.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is using `FileSystem::Instance()` w/o calling `FileSystem::Initialize()`. Use `SubsystemRAII` to do that.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Use PyBytes and PyByteArray in Python Data Objects unittest (#82098)</title>
<updated>2024-02-17T19:37:26+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-02-17T19:37:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=27f2908fbc8092f3567385a63676d623523b318b'/>
<id>27f2908fbc8092f3567385a63676d623523b318b</id>
<content type='text'>
Use a Python Bytes and ByteArray object instead of Integers for
TestOwnedReferences and TestBorrowedReferences. These two tests were
failing when building against Python 3.12 because these Integer objects
had a refcount of 4294967296 (-1). I didn't dig into it, but I suspect
the Python runtime has adopted an optimization to decrease refcounting
traffic for these simple objects.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use a Python Bytes and ByteArray object instead of Integers for
TestOwnedReferences and TestBorrowedReferences. These two tests were
failing when building against Python 3.12 because these Integer objects
had a refcount of 4294967296 (-1). I didn't dig into it, but I suspect
the Python runtime has adopted an optimization to decrease refcounting
traffic for these simple objects.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Check for abstract methods implementation in Scripted Plugin Objects (#71260)</title>
<updated>2023-11-08T06:01:41+00:00</updated>
<author>
<name>Med Ismail Bennani</name>
<email>ismail@bennani.ma</email>
</author>
<published>2023-11-08T06:01:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0a21144614950ce063d8dac6394307bd3be604cd'/>
<id>0a21144614950ce063d8dac6394307bd3be604cd</id>
<content type='text'>
This patch enforces that every scripted object implements all the
necessary abstract methods.

Every scripted affordance language interface can implement a list of
abstract methods name that checked when the object is instanciated.

Since some scripting affordances implementations can be derived from
template base classes, we can't check the object dictionary since it
will contain the definition of the base class, so instead, this checks
the scripting class dictionary.

Previously, for the various python interfaces, we used
`ABC.abstractmethod` decorators but this is too language specific and
doesn't work for scripting affordances that are not derived from
template base classes (i.e OperatingSystem, ScriptedThreadPlan, ...), so
this patch provides generic/language-agnostic checks for every scripted
affordance.

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 enforces that every scripted object implements all the
necessary abstract methods.

Every scripted affordance language interface can implement a list of
abstract methods name that checked when the object is instanciated.

Since some scripting affordances implementations can be derived from
template base classes, we can't check the object dictionary since it
will contain the definition of the base class, so instead, this checks
the scripting class dictionary.

Previously, for the various python interfaces, we used
`ABC.abstractmethod` decorators but this is too language specific and
doesn't work for scripting affordances that are not derived from
template base classes (i.e OperatingSystem, ScriptedThreadPlan, ...), so
this patch provides generic/language-agnostic checks for every scripted
affordance.

Signed-off-by: Med Ismail Bennani &lt;ismail@bennani.ma&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[lldb] Check for abstract methods implementation in Scripted Plugin Objects (#71260)"</title>
<updated>2023-11-07T21:04:01+00:00</updated>
<author>
<name>Med Ismail Bennani</name>
<email>ismail@bennani.ma</email>
</author>
<published>2023-11-07T21:04:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c2ad9f8b607931430e86da7420493599c48e62a0'/>
<id>c2ad9f8b607931430e86da7420493599c48e62a0</id>
<content type='text'>
This reverts commit cc9ad72713405ef8f2468c7a714a137b4a3343ba since it
breaks some tests upstream:

https://lab.llvm.org/buildbot/#/builders/68/builds/63112

********************
Failed Tests (4):
  lldb-api :: functionalities/gdb_remote_client/TestThreadSelectionBug.py
  lldb-api :: functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py
  lldb-api :: functionalities/plugins/python_os_plugin/stepping_plugin_threads/TestOSPluginStepping.py
  lldb-api :: functionalities/postmortem/mach-core/TestMachCore.py
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit cc9ad72713405ef8f2468c7a714a137b4a3343ba since it
breaks some tests upstream:

https://lab.llvm.org/buildbot/#/builders/68/builds/63112

********************
Failed Tests (4):
  lldb-api :: functionalities/gdb_remote_client/TestThreadSelectionBug.py
  lldb-api :: functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py
  lldb-api :: functionalities/plugins/python_os_plugin/stepping_plugin_threads/TestOSPluginStepping.py
  lldb-api :: functionalities/postmortem/mach-core/TestMachCore.py
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Check for abstract methods implementation in Scripted Plugin Objects (#71260)</title>
<updated>2023-11-07T20:07:16+00:00</updated>
<author>
<name>Med Ismail Bennani</name>
<email>ismail@bennani.ma</email>
</author>
<published>2023-11-07T20:07:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cc9ad72713405ef8f2468c7a714a137b4a3343ba'/>
<id>cc9ad72713405ef8f2468c7a714a137b4a3343ba</id>
<content type='text'>
This patch enforces that every scripted object implements all the
necessary abstract methods.

Every scripted affordance language interface can implement a list of
abstract methods name that checked when the object is instanciated.

Since some scripting affordances implementations can be derived from
template base classes, we can't check the object dictionary since it
will contain the definition of the base class, so instead, this checks
the scripting class dictionary.

Previously, for the various python interfaces, we used
`ABC.abstractmethod` decorators but this is too language specific and
doesn't work for scripting affordances that are not derived from
template base classes (i.e OperatingSystem, ScriptedThreadPlan, ...), so
this patch provides generic/language-agnostic checks for every scripted
affordance.

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 enforces that every scripted object implements all the
necessary abstract methods.

Every scripted affordance language interface can implement a list of
abstract methods name that checked when the object is instanciated.

Since some scripting affordances implementations can be derived from
template base classes, we can't check the object dictionary since it
will contain the definition of the base class, so instead, this checks
the scripting class dictionary.

Previously, for the various python interfaces, we used
`ABC.abstractmethod` decorators but this is too language specific and
doesn't work for scripting affordances that are not derived from
template base classes (i.e OperatingSystem, ScriptedThreadPlan, ...), so
this patch provides generic/language-agnostic checks for every scripted
affordance.

Signed-off-by: Med Ismail Bennani &lt;ismail@bennani.ma&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Remove an unused using decl (NFC)</title>
<updated>2023-10-22T18:57:23+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2023-10-22T18:57:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=aaa5f34b6130cc667b6dc893db302e21bf59fd5a'/>
<id>aaa5f34b6130cc667b6dc893db302e21bf59fd5a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</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>
</feed>
