aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/corelow.c4
-rw-r--r--gdb/procfs.c45
3 files changed, 45 insertions, 14 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index dc33c45..5a27eed 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,13 @@
+Sat Apr 26 02:42:52 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * corelow.c (get_core_registers): Initialize cf.
+
+ * procfs.c: Minor changes to make pre-ANSI compilers happy.
+ (procfs_notice_signals): Copy traced signal set back to
+ pi->prrun.pr_trace.
+ (unconditionally_kill_inferior): If PR_DEAD is defined,
+ rerun inferior after killing it.
+
Fri Apr 25 00:10:18 1997 Jeffrey A Law (law@cygnus.com)
* config/mn10300/tm-mn10300.h (EXTRACT_STRUCT_VALUE_ADDRESS): The
diff --git a/gdb/corelow.c b/gdb/corelow.c
index c3ddebb..d7cab71 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -1,5 +1,5 @@
/* Core dump and executable file functions below target vector, for GDB.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996
+ Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997
Free Software Foundation, Inc.
This file is part of GDB.
@@ -280,7 +280,7 @@ get_core_registers (regno)
char *the_regs;
char secname[10];
enum bfd_flavour our_flavour = bfd_get_flavour (core_bfd);
- struct core_fns *cf;
+ struct core_fns *cf = NULL;
if (core_file_fns == NULL)
{
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 539835e..9d3c969 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -65,19 +65,19 @@ regardless of whether or not the actual target has floating point hardware.
/* proc name formats may vary depending on the proc implementation */
#ifdef HAVE_MULTIPLE_PROC_FDS
- #ifndef CTL_PROC_NAME_FMT
- #define CTL_PROC_NAME_FMT "/proc/%d/ctl"
- #define AS_PROC_NAME_FMT "/proc/%d/as"
- #define MAP_PROC_NAME_FMT "/proc/%d/map"
- #define STATUS_PROC_NAME_FMT "/proc/%d/status"
- #endif
+# ifndef CTL_PROC_NAME_FMT
+# define CTL_PROC_NAME_FMT "/proc/%d/ctl"
+# define AS_PROC_NAME_FMT "/proc/%d/as"
+# define MAP_PROC_NAME_FMT "/proc/%d/map"
+# define STATUS_PROC_NAME_FMT "/proc/%d/status"
+# endif
#else /* HAVE_MULTIPLE_PROC_FDS */
- #ifndef CTL_PROC_NAME_FMT
- #define CTL_PROC_NAME_FMT "/proc/%05d"
- #define AS_PROC_NAME_FMT "/proc/%05d"
- #define MAP_PROC_NAME_FMT "/proc/%05d"
- #define STATUS_PROC_NAME_FMT "/proc/%05d"
- #endif
+# ifndef CTL_PROC_NAME_FMT
+# define CTL_PROC_NAME_FMT "/proc/%05d"
+# define AS_PROC_NAME_FMT "/proc/%05d"
+# define MAP_PROC_NAME_FMT "/proc/%05d"
+# define STATUS_PROC_NAME_FMT "/proc/%05d"
+# endif
#endif /* HAVE_MULTIPLE_PROC_FDS */
#define MAX_PROC_NAME_SIZE sizeof("/proc/1234567890/status")
@@ -1740,6 +1740,23 @@ unconditionally_kill_inferior (pi)
procfs_write_pckill (pi);
#endif /* PROCFS_NEED_PIOCSSIG_FOR_KILL */
+#ifdef PR_DEAD
+ /* With Alpha OSF/1 procfs, the process remains stopped after the inferior
+ gets killed. After some time, the stop reason of the inferior changes
+ to PR_DEAD and a PIOCRUN ioctl must be used to finally terminate the
+ process. While the stop reason has not yet changed to PR_DEAD,
+ the PIOCRUN will return with EAGAIN, and we keep trying.
+ Any other errors are silently ignored as the inferior might have
+ died already. */
+ while (procfs_read_status (pi) && (pi->prstatus.pr_flags & PR_STOPPED))
+ {
+ pi->prrun.pr_flags = PRCFAULT;
+ if (ioctl (pi->ctl_fd, PIOCRUN, &pi->prrun) >= 0 || errno != EAGAIN)
+ break;
+ sleep (1);
+ }
+#endif
+
close_proc_file (pi);
/* Only wait() for our direct children. Our grandchildren zombies are killed
@@ -2340,6 +2357,10 @@ procfs_notice_signals (pid)
#endif
notice_signals (pi, &sctl);
+
+#ifndef UNIXWARE
+ pi->prrun.pr_trace = sctl.sigset;
+#endif
}
static void