================ @@ -571,6 +571,15 @@ SBStructuredData SBCommandInterpreter::GetStatistics() { return data; } +SBStructuredData SBCommandInterpreter::GetTranscript() { + LLDB_INSTRUMENT_VA(this); + + SBStructuredData data; + if (IsValid()) + data.m_impl_up->SetObjectSP(m_opaque_ptr->GetTranscript()); ---------------- clayborg wrote:
Here don't want to hand out a shared pointer to the internal transcript. If we do and the caller starts accessing it, we can crash if new commands are added to the structured data. If we to not copy things, one thing we could do it to grab the transript shared pointer from the command interpreter and have it create a new one. https://github.com/llvm/llvm-project/pull/90703 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits