[lldb] Remove Debugger::Get{Output,Error}Stream (NFC) (#126821)

Remove Debugger::GetOutputStream and Debugger::GetErrorStream in
preparation for replacing both with a new variant that needs to be
locked and hence can't be handed out like we do right now.

The patch replaces most uses with GetAsyncOutputStream and
GetAsyncErrorStream respectively. There methods return new StreamSP
objects that automatically get flushed on destruction.

See #126630 for more details.
This commit is contained in:
Jonas Devlieghere
2025-02-12 08:29:06 -08:00
committed by GitHub
parent bee9664970
commit eff3c343b0
15 changed files with 95 additions and 109 deletions

View File

@@ -1664,7 +1664,7 @@ Process::CreateBreakpointSite(const BreakpointLocationSP &constituent,
Address symbol_address = symbol->GetAddress();
load_addr = ResolveIndirectFunction(&symbol_address, error);
if (!error.Success() && show_error) {
GetTarget().GetDebugger().GetErrorStream().Printf(
GetTarget().GetDebugger().GetAsyncErrorStream()->Printf(
"warning: failed to resolve indirect function at 0x%" PRIx64
" for breakpoint %i.%i: %s\n",
symbol->GetLoadAddress(&GetTarget()),
@@ -1703,7 +1703,7 @@ Process::CreateBreakpointSite(const BreakpointLocationSP &constituent,
} else {
if (show_error || use_hardware) {
// Report error for setting breakpoint...
GetTarget().GetDebugger().GetErrorStream().Printf(
GetTarget().GetDebugger().GetAsyncErrorStream()->Printf(
"warning: failed to set breakpoint site at 0x%" PRIx64
" for breakpoint %i.%i: %s\n",
load_addr, constituent->GetBreakpoint().GetID(),