[Lldb-commits] [lldb] [LLDB] Print stderr in HandleStop (PR #208875)
via lldb-commits
lldb-commits at lists.llvm.org
Sat Jul 11 04:33:26 PDT 2026
https://github.com/aokblast updated https://github.com/llvm/llvm-project/pull/208875
>From a74c2afa632510e64d84c2bad625f3187a691783 Mon Sep 17 00:00:00 2001
From: ShengYi Hung <aokblast at FreeBSD.org>
Date: Sat, 11 Jul 2026 10:16:46 +0800
Subject: [PATCH] [LLDB] Print stderr in HandleStop
There are some testcases silently fail in stopping hook without
returning anything on FreeBSD. We dump the error from the handler to
make it easier to debug.
---
lldb/source/Target/Target.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index 23e45f1d4fd76..0e868d38f67ae 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -4291,6 +4291,7 @@ Target::StopHookCommandLine::HandleStop(ExecutionContext &exc_ctx,
CommandReturnObject result(false);
result.SetImmediateOutputStream(output_sp);
+ result.SetImmediateErrorStream(output_sp);
result.SetInteractive(false);
Debugger &debugger = exc_ctx.GetTargetPtr()->GetDebugger();
CommandInterpreterRunOptions options;
@@ -4605,6 +4606,7 @@ Target::HookCommandLine::HandleStop(ExecutionContext &exc_ctx,
CommandReturnObject result(false);
result.SetImmediateOutputStream(output_sp);
+ result.SetImmediateErrorStream(output_sp);
result.SetInteractive(false);
Debugger &debugger = exc_ctx.GetTargetPtr()->GetDebugger();
CommandInterpreterRunOptions options;
More information about the lldb-commits
mailing list