[Lldb-commits] [lldb] [lldb-dap] Report exit status message in lldb-dap, same as lldb cli (PR #89405)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Apr 22 09:45:29 PDT 2024
================
@@ -503,6 +503,14 @@ void EventThreadFunction() {
SendContinuedEvent();
break;
case lldb::eStateExited:
+ const int exit_status = process.GetExitStatus();
+ const char *const exit_description = process.GetExitDescription();
+ g_dap.SendFormattedOutput(
+ OutputType::Console,
+ "Process %" PRIu64 " exited with status = %i (0x%8.8x) %s\n",
+ process.GetProcessID(), exit_status, exit_status,
+ exit_description ? exit_description : "");
+
----------------
jeffreytan81 wrote:
This code seems to be a duplication of `Process::GetStatus`. Maybe we should expose `Process::GetStatus` in SBPorcess to ensure lldb-dap and lldb output are not out of sync if future modification is added to `Process::GetStatus`.
https://github.com/llvm/llvm-project/pull/89405
More information about the lldb-commits
mailing list