[Lldb-commits] [PATCH] D86336: [debugserver] Fix that debugserver's stop reply packets always return signal code 0
Raphael Isemann via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 3 00:47:35 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf0699d910914: [debugserver] Fix that debugserver's stop reply packets always return signal… (authored by teemperor).
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86336/new/
https://reviews.llvm.org/D86336
Files:
lldb/test/Shell/Process/Inputs/abort.c
lldb/test/Shell/Process/TestAbortExitCode.test
lldb/tools/debugserver/source/RNBRemote.cpp
Index: lldb/tools/debugserver/source/RNBRemote.cpp
===================================================================
--- lldb/tools/debugserver/source/RNBRemote.cpp
+++ lldb/tools/debugserver/source/RNBRemote.cpp
@@ -3066,7 +3066,7 @@
WEXITSTATUS(pid_status));
else if (WIFSIGNALED(pid_status))
snprintf(pid_exited_packet, sizeof(pid_exited_packet), "X%02x",
- WEXITSTATUS(pid_status));
+ WTERMSIG(pid_status));
else if (WIFSTOPPED(pid_status))
snprintf(pid_exited_packet, sizeof(pid_exited_packet), "S%02x",
WSTOPSIG(pid_status));
Index: lldb/test/Shell/Process/TestAbortExitCode.test
===================================================================
--- /dev/null
+++ lldb/test/Shell/Process/TestAbortExitCode.test
@@ -0,0 +1,6 @@
+UNSUPPORTED: system-windows
+
+RUN: %clang_host %p/Inputs/abort.c -o %t
+RUN: %lldb %t -o run -o continue | FileCheck %s
+
+CHECK: status = 6 (0x00000006) Terminated due to signal 6
Index: lldb/test/Shell/Process/Inputs/abort.c
===================================================================
--- /dev/null
+++ lldb/test/Shell/Process/Inputs/abort.c
@@ -0,0 +1,3 @@
+#include <stdlib.h>
+
+int main(int argc, char **argv) { abort(); }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86336.289648.patch
Type: text/x-patch
Size: 1276 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200903/e438db46/attachment.bin>
More information about the lldb-commits
mailing list