diff options
| author | Med Ismail Bennani <ismail@bennani.ma> | 2024-05-23 01:46:29 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-23 01:46:29 -0700 |
| commit | ae3f68066c8f282145435880107c1d3dc26ec3b8 (patch) | |
| tree | 00f2172de3259bafe16f6dcabf831ef56e9195f2 /lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.cpp | |
| parent | 8f50bcaadced3041a6a132286e3b62ad6fd9cf74 (diff) | |
Revert "[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan (Reland #70392)" (#93153)
Reverts llvm/llvm-project#93149 since it breaks
https://lab.llvm.org/buildbot/#/builders/68/builds/74799
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) { |
