From a2e3af5d581547d3ea53e5383d6f7f1cab45120a Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Fri, 28 Jun 2024 13:25:11 +0200 Subject: Revert "[lldb/Interpreter] Discard ScriptedThreadPlan::GetStopDescription return value (#96985)" This reverts commit 1130e923e2d7fe046101bf639bc5ebcde194c005. Very likely causes build problems on Windows and with LLVM_NO_DEAD_STRIP=ON, see https://github.com/llvm/llvm-project/pull/96985#pullrequestreview-2147599208 --- .../Python/Interfaces/ScriptedPythonInterface.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.cpp') diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.cpp index 699412e437a1..7d072212676e 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.cpp @@ -26,6 +26,15 @@ ScriptedPythonInterface::ScriptedPythonInterface( ScriptInterpreterPythonImpl &interpreter) : ScriptedInterface(), m_interpreter(interpreter) {} +template <> +void ScriptedPythonInterface::ReverseTransform( + lldb_private::Stream *&original_arg, python::PythonObject transformed_arg, + Status &error) { + Stream *s = ExtractValueFromPythonObject(transformed_arg, error); + *original_arg = *s; + original_arg->PutCString(static_cast(s)->GetData()); +} + template <> StructuredData::ArraySP ScriptedPythonInterface::ExtractValueFromPythonObject( @@ -65,8 +74,7 @@ Event *ScriptedPythonInterface::ExtractValueFromPythonObject( } template <> -lldb::StreamSP -ScriptedPythonInterface::ExtractValueFromPythonObject( +Stream *ScriptedPythonInterface::ExtractValueFromPythonObject( python::PythonObject &p, Status &error) { if (lldb::SBStream *sb_stream = reinterpret_cast( python::LLDBSWIGPython_CastPyObjectToSBStream(p.get()))) -- cgit v1.2.3