[Lldb-commits] [PATCH] D117071: [lldb/Plugins] Add support of multiple ScriptedThreads in a ScriptedProcess

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 12 12:31:21 PST 2022


mib updated this revision to Diff 399413.
mib added a reviewer: labath.
mib added a comment.

Update after abandoning D117065 <https://reviews.llvm.org/D117065> for D117139 <https://reviews.llvm.org/D117139>.

To create the ScriptedThread, we pass  a `StructuredData::Object*` that contains a borrowed reference of the python ScriptedThread instance, to the constructor.

Previously, we just re-assigned the ScriptedThread StructuredData script object shared_ptr with the `StructuredData::Object*`.
Now, we "extract" the python borrowed reference from the `StructuredData::Object*` and create a new StructuredData object with it, to make sure we can access it even after the `StructuredData::Object*` gets freed when exiting `ScriptedProcess::DoUpdateThreadList `


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117071/new/

https://reviews.llvm.org/D117071

Files:
  lldb/examples/python/scripted_process/scripted_process.py
  lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp
  lldb/source/Plugins/Process/scripted/ScriptedThread.cpp
  lldb/source/Plugins/Process/scripted/ScriptedThread.h
  lldb/test/API/functionalities/scripted_process/Makefile
  lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py
  lldb/test/API/functionalities/scripted_process/invalid_scripted_process.py
  lldb/test/API/functionalities/scripted_process/main.c
  lldb/test/API/functionalities/scripted_process/main.cpp
  lldb/test/API/functionalities/scripted_process/stack_core_scripted_process.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117071.399413.patch
Type: text/x-patch
Size: 15219 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220112/d0fcf14a/attachment-0001.bin>


More information about the lldb-commits mailing list