Skip to content

Commit 05f09fa

Browse files
committed
Flip and add test
1 parent 9ca41b6 commit 05f09fa

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ static std::string GetDescriptionFromSiginfo(lldb::ValueObjectSP siginfo_sp) {
564564
}
565565

566566
return linux_signals.GetSignalDescription(signo, code, addr, lower, upper,
567-
uid, pid);
567+
pid, uid);
568568
}
569569

570570
lldb::StopInfoSP PlatformLinux::GetStopInfoFromSiginfo(Thread &thread) {
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#include <signal.h>
2+
#include <sys/syscall.h>
3+
4+
int main() {
5+
// Get the current thread ID
6+
pid_t tid = syscall(SYS_gettid);
7+
// Send a SIGSEGV signal to the current thread
8+
syscall(SYS_tkill, tid, SIGSEGV);
9+
return 0;
10+
}
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# XFAIL: system-darwin
2+
# XFAIL: system-windows
3+
# RUN: %lldb -b -s %s -c %p/Inputs/x86-64-linux-tkill.test | FileCheck %s
4+
5+
thread list
6+
# CHECK: * thread #1, name = 'tkill.out', stop reason = SIGSEGV: sent by tkill system call (sender pid=649752, uid=2667987)

0 commit comments

Comments
 (0)