<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp, branch users/boomanaiden154/main.ci-make-premerge-uploadwrite-comments</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/Interpreter] Implement ScriptedFrameProvider{,Python}Interface (#166662)</title>
<updated>2025-11-06T19:54:17+00:00</updated>
<author>
<name>Med Ismail Bennani</name>
<email>ismail@bennani.ma</email>
</author>
<published>2025-11-06T19:54:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4cd17eeaeb13f44e7c0783e83716c06a2b9110a3'/>
<id>4cd17eeaeb13f44e7c0783e83716c06a2b9110a3</id>
<content type='text'>
This patch implements the base and python interface for the
ScriptedFrameProvider class.

This is necessary to call python APIs from the ScriptedFrameProvider
that will come in a follow-up.

Signed-off-by: Med Ismail Bennani &lt;ismail@bennani.ma&gt;

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 implements the base and python interface for the
ScriptedFrameProvider class.

This is necessary to call python APIs from the ScriptedFrameProvider
that will come in a follow-up.

Signed-off-by: Med Ismail Bennani &lt;ismail@bennani.ma&gt;

Signed-off-by: Med Ismail Bennani &lt;ismail@bennani.ma&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Do not narrow `GetIndexOfChildWithName` return type to int (#165453)</title>
<updated>2025-10-29T18:22:54+00:00</updated>
<author>
<name>Ebuka Ezike</name>
<email>yerimyah1@gmail.com</email>
</author>
<published>2025-10-29T18:22:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d87c80bd46d9dc761b048cad48838a039cff214a'/>
<id>d87c80bd46d9dc761b048cad48838a039cff214a</id>
<content type='text'>
Modify the python wrapper to return uint32_t,
which prevents incorrect child name-to-index mapping and avoids
performing redundant operations on non-existent SBValues.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Modify the python wrapper to return uint32_t,
which prevents incorrect child name-to-index mapping and avoids
performing redundant operations on non-existent SBValues.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Introduce ScriptedFrame affordance (#149622)</title>
<updated>2025-09-04T22:07:11+00:00</updated>
<author>
<name>Med Ismail Bennani</name>
<email>ismail@bennani.ma</email>
</author>
<published>2025-09-04T22:07:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=84b56202fbe150e06f92c855107489e08cc17bcd'/>
<id>84b56202fbe150e06f92c855107489e08cc17bcd</id>
<content type='text'>
This patch introduces a new scripting affordance in lldb:
`ScriptedFrame`.

This allows user to produce mock stackframes in scripted threads and
scripted processes from a python script.

With this change, StackFrame can be synthetized from different sources:
- Either from a dictionary containing a load address, and a frame index,
  which is the legacy way.
- Or by creating a ScriptedFrame python object.

One particularity of synthezising stackframes from the ScriptedFrame
python object, is that these frame have an optional PC, meaning that
they don't have a report a valid PC and they can act as shells that just
contain static information, like the frame function name, the list of
variables or registers, etc. It can also provide a symbol context.

rdar://157260006

Signed-off-by: Med Ismail Bennani &lt;ismail@bennani.ma&gt;

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 introduces a new scripting affordance in lldb:
`ScriptedFrame`.

This allows user to produce mock stackframes in scripted threads and
scripted processes from a python script.

With this change, StackFrame can be synthetized from different sources:
- Either from a dictionary containing a load address, and a frame index,
  which is the legacy way.
- Or by creating a ScriptedFrame python object.

One particularity of synthezising stackframes from the ScriptedFrame
python object, is that these frame have an optional PC, meaning that
they don't have a report a valid PC and they can act as shells that just
contain static information, like the frame function name, the list of
variables or registers, etc. It can also provide a symbol context.

rdar://157260006

Signed-off-by: Med Ismail Bennani &lt;ismail@bennani.ma&gt;

Signed-off-by: Med Ismail Bennani &lt;ismail@bennani.ma&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Use (only) PyImport_AppendInittab to patch readline (#153329)</title>
<updated>2025-08-14T18:47:48+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-08-14T18:47:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b62b65a95f2b5e79e90f3f957e7a52ec50c5fe31'/>
<id>b62b65a95f2b5e79e90f3f957e7a52ec50c5fe31</id>
<content type='text'>
The current implementation tries to (1) patch the existing readline
module definition if it's already present in the inittab and (2) append
our patched readline module to the inittab. The former (1) uses the
non-stable Python API and I can't find a situation where this is
necessary. 

We do this work before initialization, so for the readline
module to exist, it either needs to be added by Python itself (which
doesn't seem to be the case), or someone would have had to have added it
without initializing.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current implementation tries to (1) patch the existing readline
module definition if it's already present in the inittab and (2) append
our patched readline module to the inittab. The former (1) uses the
non-stable Python API and I can't find a situation where this is
necessary. 

We do this work before initialization, so for the readline
module to exist, it either needs to be added by Python itself (which
doesn't seem to be the case), or someone would have had to have added it
without initializing.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Use PyThread_get_thread_ident instead of accessing PyThreadState (#153460)</title>
<updated>2025-08-14T17:41:49+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-08-14T17:41:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ac0ad5093ab451a36ea9ed34b0d3d461e759f4ea'/>
<id>ac0ad5093ab451a36ea9ed34b0d3d461e759f4ea</id>
<content type='text'>
Use `PyThread_get_thread_ident`, which is part of the Stable API,
instead of accessing a member of the PyThreadState, which is opaque when
using the Stable API.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use `PyThread_get_thread_ident`, which is part of the Stable API,
instead of accessing a member of the PyThreadState, which is opaque when
using the Stable API.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Only use PyConfig when LLDB_EMBED_PYTHON_HOME is enabled (#152588)</title>
<updated>2025-08-08T16:49:43+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-08-08T16:49:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bcdc80828bcb94922db6e5b8f1c0935b2f5a67e2'/>
<id>bcdc80828bcb94922db6e5b8f1c0935b2f5a67e2</id>
<content type='text'>
PyConfig and friends are not part of the stable API. We could switch
back to Py_SetPythonHome, which has been deprecated, but still part of
the stable API. For now, limit the use of PyConfig to when
LLDB_EMBED_PYTHON_HOME is enabled, which essentially means Windows.
Changing the order doesn't seem to matter.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PyConfig and friends are not part of the stable API. We could switch
back to Py_SetPythonHome, which has been deprecated, but still part of
the stable API. For now, limit the use of PyConfig to when
LLDB_EMBED_PYTHON_HOME is enabled, which essentially means Windows.
Changing the order doesn't seem to matter.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Eliminate PyGILState_Check (NFC) (#152006)</title>
<updated>2025-08-04T17:44:32+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-08-04T17:44:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ad623a813e6d9ffdef62270656245b35ffceda37'/>
<id>ad623a813e6d9ffdef62270656245b35ffceda37</id>
<content type='text'>
Eliminate calls to PyGILState_Check, which is not part of the Python
Limited C API. In the Locker, we can use PyGILState_Ensure directly. We
could do something similar to replace the assert, but I don't think it's
worth it. We don't assert that we hold the GIL anywhere else.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Eliminate calls to PyGILState_Check, which is not part of the Python
Limited C API. In the Locker, we can use PyGILState_Ensure directly. We
could do something similar to replace the assert, but I don't think it's
worth it. We don't assert that we hold the GIL anywhere else.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Simplify Python Locker log messages (NFC)</title>
<updated>2025-08-04T16:37:37+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-08-04T16:35:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8f77fa7026de9f544778063fd9fe900d0804b863'/>
<id>8f77fa7026de9f544778063fd9fe900d0804b863</id>
<content type='text'>
Eliminate the `log` variable by inlining the GetLog call and use
"locked" and "unlocked" directly, as requested by Ismail in #151780.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Eliminate the `log` variable by inlining the GetLog call and use
"locked" and "unlocked" directly, as requested by Ismail in #151780.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Eliminate InitializePythonRAII::InitializeThreadsPrivate (NFC) (#151780)</title>
<updated>2025-08-04T16:08:20+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-08-04T16:08:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0ee1811624383b4601c969d72e851377f868120f'/>
<id>0ee1811624383b4601c969d72e851377f868120f</id>
<content type='text'>
The behavior of thread initialization changed in Python 3.7. The minimum
supported Python version is now 3.8. That means that
`PyEval_ThreadsInitialized` always returns true and `PyEval_InitThreads`
is never called.

The helper function existed to coordinate initializing the threads and
acquiring the GIL, which is no longer necessary. With that, there's no
point in having the helper at all. This PR eliminates the function and
inlines to GIL acquisition into the caller.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The behavior of thread initialization changed in Python 3.7. The minimum
supported Python version is now 3.8. That means that
`PyEval_ThreadsInitialized` always returns true and `PyEval_InitThreads`
is never called.

The helper function existed to coordinate initializing the threads and
acquiring the GIL, which is no longer necessary. With that, there's no
point in having the helper at all. This PR eliminates the function and
inlines to GIL acquisition into the caller.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Reimplment PyRun_SimpleString using the Python stable C API (#151777)</title>
<updated>2025-08-01T23:18:24+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2025-08-01T23:18:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4d1ae58d9e1d679cd0f35ce935579df221b14882'/>
<id>4d1ae58d9e1d679cd0f35ce935579df221b14882</id>
<content type='text'>
Reimplment `PyRun_SimpleString` using the Python stable C API and the
`RunString` helper.

Part of https://github.com/llvm/llvm-project/issues/151617</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reimplment `PyRun_SimpleString` using the Python stable C API and the
`RunString` helper.

Part of https://github.com/llvm/llvm-project/issues/151617</pre>
</div>
</content>
</entry>
</feed>
