From 65998ab2cb5069871799cd6d0977954f14cbb93e Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Wed, 19 Feb 2025 08:31:40 -0800 Subject: [lldb] Make GetOutputStreamSP and GetErrorStreamSP protected (#127682) This makes GetOutputStreamSP and GetErrorStreamSP protected members of Debugger. Users who want to print to the debugger's stream should use GetAsyncOutputStreamSP and GetAsyncErrorStreamSP instead and the few remaining stragglers have been migrated. --- lldb/source/API/SBDebugger.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lldb/source/API/SBDebugger.cpp') diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp index bf19d2f..e646b09 100644 --- a/lldb/source/API/SBDebugger.cpp +++ b/lldb/source/API/SBDebugger.cpp @@ -509,14 +509,14 @@ SBFile SBDebugger::GetInputFile() { FILE *SBDebugger::GetOutputFileHandle() { LLDB_INSTRUMENT_VA(this); if (m_opaque_sp) - return m_opaque_sp->GetOutputStreamSP()->GetFile().GetStream(); + return m_opaque_sp->GetOutputFileSP()->GetStream(); return nullptr; } SBFile SBDebugger::GetOutputFile() { LLDB_INSTRUMENT_VA(this); if (m_opaque_sp) - return SBFile(m_opaque_sp->GetOutputStreamSP()->GetFileSP()); + return SBFile(m_opaque_sp->GetOutputFileSP()); return SBFile(); } @@ -524,7 +524,7 @@ FILE *SBDebugger::GetErrorFileHandle() { LLDB_INSTRUMENT_VA(this); if (m_opaque_sp) - return m_opaque_sp->GetErrorStreamSP()->GetFile().GetStream(); + return m_opaque_sp->GetErrorFileSP()->GetStream(); return nullptr; } @@ -532,7 +532,7 @@ SBFile SBDebugger::GetErrorFile() { LLDB_INSTRUMENT_VA(this); SBFile file; if (m_opaque_sp) - return SBFile(m_opaque_sp->GetErrorStreamSP()->GetFileSP()); + return SBFile(m_opaque_sp->GetErrorFileSP()); return SBFile(); } @@ -573,8 +573,8 @@ void SBDebugger::HandleCommand(const char *command) { sb_interpreter.HandleCommand(command, result, false); - result.PutError(m_opaque_sp->GetErrorStreamSP()->GetFileSP()); - result.PutOutput(m_opaque_sp->GetOutputStreamSP()->GetFileSP()); + result.PutError(m_opaque_sp->GetErrorFileSP()); + result.PutOutput(m_opaque_sp->GetOutputFileSP()); if (!m_opaque_sp->GetAsyncExecution()) { SBProcess process(GetCommandInterpreter().GetProcess()); -- cgit v1.1