[Lldb-commits] [lldb] [lldb] Implement qXfer:siginfo:read on NetBSD (PR #233875)
David CARLIER via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 20 08:48:23 PDT 2026
================
@@ -326,3 +326,22 @@ NativeThreadNetBSD::CopyWatchpointsFrom(NativeThreadNetBSD &source) {
}
return s;
}
+
+llvm::Expected<std::unique_ptr<llvm::MemoryBuffer>>
+NativeThreadNetBSD::GetSiginfo() const {
+ ptrace_siginfo_t info;
+ Status error = NativeProcessNetBSD::PtraceWrapper(
+ PT_GET_SIGINFO, m_process.GetID(), &info, sizeof(info));
+ if (error.Fail())
+ return error.ToError();
+
+ // The siginfo describes the signal which stopped the process. The signal
+ // belongs to this thread if it was sent to it, or to the whole process.
+ if (info.psi_lwpid != 0 &&
----------------
devnexen wrote:
For a SIGSTOP that lldb-server didn't send (e.g. kill -STOP), MonitorSIGSTOP leaves the thread stop reasons unchanged. Every thread then returns SIGSTOP siginfo along with a stale stop reason. FreeBSD and Linux avoid this by assigning the stop to threads. This was already broken before this patch, so it can be fixed separately. wdyt (or your agent) ?
https://github.com/llvm/llvm-project/pull/233875
More information about the lldb-commits
mailing list