Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Track the LWP ID of a synchronous (trap) signal, and rep...
details: https://anonhg.NetBSD.org/src/rev/a3e9131085a9
branches: trunk
changeset: 547482:a3e9131085a9
user: nathanw <nathanw%NetBSD.org@localhost>
date: Tue May 20 17:42:51 2003 +0000
description:
Track the LWP ID of a synchronous (trap) signal, and report it in core dumps.
diffstat:
sys/kern/core_elf32.c | 5 +++--
sys/kern/kern_sig.c | 6 ++++--
sys/sys/signalvar.h | 3 ++-
3 files changed, 9 insertions(+), 5 deletions(-)
diffs (77 lines):
diff -r 419475da9c3f -r a3e9131085a9 sys/kern/core_elf32.c
--- a/sys/kern/core_elf32.c Tue May 20 17:39:18 2003 +0000
+++ b/sys/kern/core_elf32.c Tue May 20 17:42:51 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: core_elf32.c,v 1.7 2003/05/16 14:25:02 itojun Exp $ */
+/* $NetBSD: core_elf32.c,v 1.8 2003/05/20 17:42:52 nathanw Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: core_elf32.c,v 1.7 2003/05/16 14:25:02 itojun Exp $");
+__KERNEL_RCSID(1, "$NetBSD: core_elf32.c,v 1.8 2003/05/20 17:42:52 nathanw Exp $");
/* If not included by core_elf64.c, ELFSIZE won't be defined. */
#ifndef ELFSIZE
@@ -305,6 +305,7 @@
cpi.cpi_cpisize = sizeof(cpi);
cpi.cpi_signo = p->p_sigctx.ps_sig;
cpi.cpi_sigcode = p->p_sigctx.ps_code;
+ cpi.cpi_siglwp = p->p_sigctx.ps_lwp;
memcpy(&cpi.cpi_sigpend, &p->p_sigctx.ps_siglist,
sizeof(cpi.cpi_sigpend));
diff -r 419475da9c3f -r a3e9131085a9 sys/kern/kern_sig.c
--- a/sys/kern/kern_sig.c Tue May 20 17:39:18 2003 +0000
+++ b/sys/kern/kern_sig.c Tue May 20 17:42:51 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_sig.c,v 1.140 2003/04/23 21:32:10 nathanw Exp $ */
+/* $NetBSD: kern_sig.c,v 1.141 2003/05/20 17:42:51 nathanw Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.140 2003/04/23 21:32:10 nathanw Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.141 2003/05/20 17:42:51 nathanw Exp $");
#include "opt_ktrace.h"
#include "opt_compat_sunos.h"
@@ -766,6 +766,7 @@
} else {
p->p_sigctx.ps_code = code; /* XXX for core dump/debugger */
p->p_sigctx.ps_sig = signum; /* XXX to verify code */
+ p->p_sigctx.ps_lwp = l->l_lid;
psignal(p, signum);
}
}
@@ -1504,6 +1505,7 @@
} else {
code = p->p_sigctx.ps_code;
p->p_sigctx.ps_code = 0;
+ p->p_sigctx.ps_lwp = 0;
p->p_sigctx.ps_sig = 0;
}
psendsig(l, signum, returnmask, code);
diff -r 419475da9c3f -r a3e9131085a9 sys/sys/signalvar.h
--- a/sys/sys/signalvar.h Tue May 20 17:39:18 2003 +0000
+++ b/sys/sys/signalvar.h Tue May 20 17:42:51 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: signalvar.h,v 1.38 2003/02/15 20:54:38 jdolecek Exp $ */
+/* $NetBSD: signalvar.h,v 1.39 2003/05/20 17:42:52 nathanw Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -73,6 +73,7 @@
int ps_flags; /* signal flags, below */
int ps_sig; /* for core dump/debugger XXX */
long ps_code; /* for core dump/debugger XXX */
+ int ps_lwp; /* for core dump/debugger XXX */
void *ps_sigcode; /* address of signal trampoline */
sigset_t ps_sigmask; /* Current signal mask. */
sigset_t ps_sigignore; /* Signals being ignored. */
Home |
Main Index |
Thread Index |
Old Index