aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPeter Schauer <Peter.Schauer@mytum.de>1995-07-29 20:56:22 +0000
committerPeter Schauer <Peter.Schauer@mytum.de>1995-07-29 20:56:22 +0000
commitb6753b3f6f85c8a9ee8cee37b392f44090bfc1cf (patch)
tree1fcb03cd36f95c82efe5dc8f6633667aff8ab757 /gdb
parente3c05e17583b9df8555a454f52bf55482b3debce (diff)
downloadgdb-b6753b3f6f85c8a9ee8cee37b392f44090bfc1cf.zip
gdb-b6753b3f6f85c8a9ee8cee37b392f44090bfc1cf.tar.gz
gdb-b6753b3f6f85c8a9ee8cee37b392f44090bfc1cf.tar.bz2
* 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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/config/alpha/nm-osf3.h26
-rw-r--r--gdb/procfs.c8
3 files changed, 37 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 53f7bf8..0eb03e4 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 0000000..9025ce3
--- /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 bf57c6b..9584bd1 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