diff options
| author | Med Ismail Bennani <ismail@bennani.ma> | 2023-10-30 17:40:11 -0700 |
|---|---|---|
| committer | Med Ismail Bennani <ismail@bennani.ma> | 2023-10-30 17:40:11 -0700 |
| commit | 6eafe2cb7a3286c1b13eea7d8370374553fe81a9 (patch) | |
| tree | b896cc7ddf2f4bd1cacaaad6f92a1f471e21f6da /lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.cpp | |
| parent | 2b7ba0155dc06de1f14a2a085f423570c1c896d0 (diff) | |
Revert "[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan (#70392)"
This reverts commit 4b3cd379cce3f455bf3c8677ca7a5be6e708a4ce since it
introduces some test failures:
https://lab.llvm.org/buildbot/#/builders/68/builds/62556
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.cpp')
| -rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.cpp | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.cpp index 7d072212676e..6f22503b279c 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.cpp @@ -27,15 +27,6 @@ ScriptedPythonInterface::ScriptedPythonInterface( : ScriptedInterface(), m_interpreter(interpreter) {} template <> -void ScriptedPythonInterface::ReverseTransform( - lldb_private::Stream *&original_arg, python::PythonObject transformed_arg, - Status &error) { - Stream *s = ExtractValueFromPythonObject<Stream *>(transformed_arg, error); - *original_arg = *s; - original_arg->PutCString(static_cast<StreamString *>(s)->GetData()); -} - -template <> StructuredData::ArraySP ScriptedPythonInterface::ExtractValueFromPythonObject<StructuredData::ArraySP>( python::PythonObject &p, Status &error) { @@ -57,34 +48,13 @@ Status ScriptedPythonInterface::ExtractValueFromPythonObject<Status>( if (lldb::SBError *sb_error = reinterpret_cast<lldb::SBError *>( python::LLDBSWIGPython_CastPyObjectToSBError(p.get()))) return m_interpreter.GetStatusFromSBError(*sb_error); - error.SetErrorString("Couldn't cast lldb::SBError to lldb::Status."); + else + error.SetErrorString("Couldn't cast lldb::SBError to lldb::Status."); return {}; } template <> -Event *ScriptedPythonInterface::ExtractValueFromPythonObject<Event *>( - python::PythonObject &p, Status &error) { - if (lldb::SBEvent *sb_event = reinterpret_cast<lldb::SBEvent *>( - python::LLDBSWIGPython_CastPyObjectToSBEvent(p.get()))) - return m_interpreter.GetOpaqueTypeFromSBEvent(*sb_event); - error.SetErrorString("Couldn't cast lldb::SBEvent to lldb_private::Event."); - - return nullptr; -} - -template <> -Stream *ScriptedPythonInterface::ExtractValueFromPythonObject<Stream *>( - python::PythonObject &p, Status &error) { - if (lldb::SBStream *sb_stream = reinterpret_cast<lldb::SBStream *>( - python::LLDBSWIGPython_CastPyObjectToSBStream(p.get()))) - return m_interpreter.GetOpaqueTypeFromSBStream(*sb_stream); - error.SetErrorString("Couldn't cast lldb::SBStream to lldb_private::Stream."); - - return nullptr; -} - -template <> lldb::DataExtractorSP ScriptedPythonInterface::ExtractValueFromPythonObject<lldb::DataExtractorSP>( python::PythonObject &p, Status &error) { |
