From: Peter Schauer Date: Sat, 29 Jul 1995 20:56:22 +0000 (+0000) Subject: * procfs.c (unconditionally_kill_inferior): Clear current signal X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b6753b3f6f85c8a9ee8cee37b392f44090bfc1cf;p=binutils-gdb.git * procfs.c (unconditionally_kill_inferior): Clear current signal if PROCFS_NEED_CLEAR_CURSIG_FOR_KILL is defined. * config/alpha/nm-osf3.h (PROCFS_NEED_CLEAR_CURSIG_FOR_KILL): Define. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 53f7bf835e5..0eb03e4f028 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ Sat Jul 29 01:45:56 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + * procfs.c (unconditionally_kill_inferior): Clear current signal + if PROCFS_NEED_CLEAR_CURSIG_FOR_KILL is defined. + * config/alpha/nm-osf3.h (PROCFS_NEED_CLEAR_CURSIG_FOR_KILL): Define. + * alpha-tdep.c: Move sigtramp handling of saved registers from read_next_frame_reg to alpha_find_saved_regs, handle saved floating point registers. diff --git a/gdb/config/alpha/nm-osf3.h b/gdb/config/alpha/nm-osf3.h new file mode 100644 index 00000000000..9025ce35414 --- /dev/null +++ b/gdb/config/alpha/nm-osf3.h @@ -0,0 +1,26 @@ +/* Native definitions for alpha running OSF/1-3.x and higher, using procfs. + Copyright (C) 1995 Free Software Foundation, Inc. + +This file is part of GDB. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* OSF/1-3.x fixes some OSF/1-2.x procfs peculiarities and adds + a new one. */ +#include "alpha/nm-osf2.h" + +#undef PROCFS_NEED_PIOCSSIG_FOR_KILL +#undef PROCFS_DONT_PIOCSSIG_CURSIG +#define PROCFS_NEED_CLEAR_CURSIG_FOR_KILL diff --git a/gdb/procfs.c b/gdb/procfs.c index bf57c6ba655..9584bd1f5d2 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -1251,8 +1251,14 @@ unconditionally_kill_inferior (pi) signo = SIGKILL; +#ifdef PROCFS_NEED_CLEAR_CURSIG_FOR_KILL + /* Alpha OSF/1-3.x procfs needs a clear of the current signal + before the PIOCKILL, otherwise it might generate a corrupted core + file for the inferior. */ + ioctl (pi->fd, PIOCSSIG, NULL); +#endif #ifdef PROCFS_NEED_PIOCSSIG_FOR_KILL - /* Alpha OSF/1 procfs needs a PIOCSSIG call with a SIGKILL signal + /* Alpha OSF/1-2.x procfs needs a PIOCSSIG call with a SIGKILL signal to kill the inferior, otherwise it might remain stopped with a pending SIGKILL. We do not check the result of the PIOCSSIG, the inferior might have