https://github.com/da-viper created https://github.com/llvm/llvm-project/pull/165270
Attaching using `core`, `gdbremote` or `attachInfo` may have an error. fail early if it does. >From d31dae6d626dd2c17dcfd5c00e3d909fa925cbf1 Mon Sep 17 00:00:00 2001 From: Ebuka Ezike <[email protected]> Date: Sun, 26 Oct 2025 21:13:13 +0000 Subject: [PATCH] [lldb-dap] Report any errors during attach request --- lldb/tools/lldb-dap/Handler/AttachRequestHandler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lldb/tools/lldb-dap/Handler/AttachRequestHandler.cpp b/lldb/tools/lldb-dap/Handler/AttachRequestHandler.cpp index 371349a26866e..490513fe8a0b8 100644 --- a/lldb/tools/lldb-dap/Handler/AttachRequestHandler.cpp +++ b/lldb/tools/lldb-dap/Handler/AttachRequestHandler.cpp @@ -124,6 +124,8 @@ Error AttachRequestHandler::Run(const AttachRequestArguments &args) const { attach_info.SetWaitForLaunch(args.waitFor, /*async=*/false); dap.target.Attach(attach_info, error); } + if (error.Fail()) + return ToError(error); } // Make sure the process is attached and stopped. _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
