aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Interpreter/ScriptInterpreter.cpp
diff options
context:
space:
mode:
authorMed Ismail Bennani <ismail@bennani.ma>2024-06-28 11:53:19 -0700
committerGitHub <noreply@github.com>2024-06-28 11:53:19 -0700
commit6cb45aea92dc87974a0064c182600228c6e94329 (patch)
tree2629f7f0db47e37b88e3c3abe970d2999f7a1afb /lldb/source/Interpreter/ScriptInterpreter.cpp
parent72c801f843d95546d92e2b15fe832503ba3bfab6 (diff)
downloadllvm-6cb45aea92dc87974a0064c182600228c6e94329.zip
llvm-6cb45aea92dc87974a0064c182600228c6e94329.tar.gz
llvm-6cb45aea92dc87974a0064c182600228c6e94329.tar.bz2
Reland "[lldb/Interpreter] Discard ScriptedThreadPlan::GetStopDescription return value (#96985)" (#97092)
This reverts commit a2e3af5d581547d3ea53e5383d6f7f1cab45120a and solves the build error in https://lab.llvm.org/buildbot/#/builders/141/builds/369. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
Diffstat (limited to 'lldb/source/Interpreter/ScriptInterpreter.cpp')
-rw-r--r--lldb/source/Interpreter/ScriptInterpreter.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lldb/source/Interpreter/ScriptInterpreter.cpp b/lldb/source/Interpreter/ScriptInterpreter.cpp
index 75b2a39..fa23964 100644
--- a/lldb/source/Interpreter/ScriptInterpreter.cpp
+++ b/lldb/source/Interpreter/ScriptInterpreter.cpp
@@ -106,10 +106,13 @@ ScriptInterpreter::GetOpaqueTypeFromSBEvent(const lldb::SBEvent &event) const {
return event.m_opaque_ptr;
}
-Stream *ScriptInterpreter::GetOpaqueTypeFromSBStream(
+lldb::StreamSP ScriptInterpreter::GetOpaqueTypeFromSBStream(
const lldb::SBStream &stream) const {
- if (stream.m_opaque_up)
- return const_cast<lldb::SBStream &>(stream).m_opaque_up.get();
+ if (stream.m_opaque_up) {
+ lldb::StreamSP s = std::make_shared<lldb_private::StreamString>();
+ *s << reinterpret_cast<StreamString *>(stream.m_opaque_up.get())->m_packet;
+ return s;
+ }
return nullptr;
}