summaryrefslogtreecommitdiffstats
path: root/sys/kern/sys_process.c
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2017-10-23 18:25:21 +0000
committerbdrewery <bdrewery@FreeBSD.org>2017-10-23 18:25:21 +0000
commit4b13cb33c40720888fe967367bf009ca6cf272fd (patch)
tree4491d3f5e0ad545aca21ef8c4ab7b103f46b625f /sys/kern/sys_process.c
parentb916159a6fa3858710d1a0f75cb5a26825ccc698 (diff)
downloadFreeBSD-src-4b13cb33c40720888fe967367bf009ca6cf272fd.zip
FreeBSD-src-4b13cb33c40720888fe967367bf009ca6cf272fd.tar.gz
MFC r316286:
Add support for capturing 'struct ptrace_lwpinfo' for signals resulting in a process dumping core in the corefile. Direct stable changed: Padding added to struct thread and td_si added to end with explicit bzeroing when forking/initializing a thread to preserve KBI.
Diffstat (limited to 'sys/kern/sys_process.c')
-rw-r--r--sys/kern/sys_process.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c
index ab592c4..7979da1 100644
--- a/sys/kern/sys_process.c
+++ b/sys/kern/sys_process.c
@@ -1335,7 +1335,7 @@ kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data)
pl->pl_flags = 0;
if (td2->td_dbgflags & TDB_XSIG) {
pl->pl_event = PL_EVENT_SIGNAL;
- if (td2->td_dbgksi.ksi_signo != 0 &&
+ if (td2->td_si.si_signo != 0 &&
#ifdef COMPAT_FREEBSD32
((!wrap32 && data >= offsetof(struct ptrace_lwpinfo,
pl_siginfo) + sizeof(pl->pl_siginfo)) ||
@@ -1347,7 +1347,7 @@ kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data)
#endif
){
pl->pl_flags |= PL_FLAG_SI;
- pl->pl_siginfo = td2->td_dbgksi.ksi_info;
+ pl->pl_siginfo = td2->td_si;
}
}
if ((pl->pl_flags & PL_FLAG_SI) == 0)
OpenPOWER on IntegriCloud