[lldb/bindings] Change ScriptedThread initializer parameters
This patch changes the `ScriptedThread` initializer in couple of ways: - It replaces the `SBTarget` parameter by a `SBProcess` (pointing to the `ScriptedProcess` that "owns" the `ScriptedThread`). - It adds a reference to the `ScriptedProcessInfo` Dictionary, to pass arbitrary user-input to the `ScriptedThread`. This patch also fixes the SWIG bindings methods that call the `ScriptedProcess` and `ScriptedThread` initializers by passing all the arguments to the appropriate `PythonCallable` object. Differential Revision: https://reviews.llvm.org/D112046 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
This commit is contained in:
1 parent
ad0f7d3d4a
commit
738621d047
7 files changed
+36
-32
No files matched your search
@@ -36,16 +36,20 @@ StructuredData::GenericSP ScriptedThreadPythonInterface::CreatePluginObject(
|
||||
if (class_name.empty())
|
||||
return {};
|
||||
|
||||
ProcessSP process_sp = exe_ctx.GetProcessSP();
|
||||
StructuredDataImpl *args_impl = nullptr;
|
||||
if (args_sp) {
|
||||
args_impl = new StructuredDataImpl();
|
||||
args_impl->SetObjectSP(args_sp);
|
||||
}
|
||||
std::string error_string;
|
||||
|
||||
Locker py_lock(&m_interpreter, Locker::AcquireLock | Locker::NoSTDIN,
|
||||
Locker::FreeLock);
|
||||
|
||||
std::string error_string;
|
||||
|
||||
TargetSP target_sp = exe_ctx.GetTargetSP();
|
||||
|
||||
void *ret_val = LLDBSwigPythonCreateScriptedThread(
|
||||
class_name.str().c_str(), m_interpreter.GetDictionaryName(), target_sp,
|
||||
error_string);
|
||||
class_name.str().c_str(), m_interpreter.GetDictionaryName(), process_sp,
|
||||
args_impl, error_string);
|
||||
|
||||
if (!ret_val)
|
||||
return {};
|
||||
|
||||
Reference in new issue
Block a user