aboutsummaryrefslogtreecommitdiff
path: root/gdb/procfs.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1992-06-25 22:22:40 +0000
committerStu Grossman <grossman@cygnus>1992-06-25 22:22:40 +0000
commit99fd9e3ee638d6a003da2a727786510ac9bf0b76 (patch)
tree28bb298db5a1bec55aca76299f0d6aba55034d51 /gdb/procfs.c
parent50e0dc4198cd5a873deeae34cf9718e805049693 (diff)
downloadgdb-99fd9e3ee638d6a003da2a727786510ac9bf0b76.zip
gdb-99fd9e3ee638d6a003da2a727786510ac9bf0b76.tar.gz
gdb-99fd9e3ee638d6a003da2a727786510ac9bf0b76.tar.bz2
* procfs.c (child_resume): Work around Solaris (on Sparc) lossage
where there is no place for nPC in prrun struct.
Diffstat (limited to 'gdb/procfs.c')
-rw-r--r--gdb/procfs.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 251ddb4..b205c66 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -2039,8 +2039,18 @@ child_resume (step, signo)
int signo;
{
errno = 0;
- pi.prrun.pr_flags = PRSVADDR | PRSTRACE | PRSFAULT | PRCFAULT;
+ pi.prrun.pr_flags = PRSTRACE | PRSFAULT | PRCFAULT;
+
+#if !defined(sun) && !defined(sparc)
+/* Can't do this under Solaris running on a Sparc, as there seems to be no
+ place to put nPC. In fact, if you use this, nPC seems to be set to some
+ random garbage. We have to rely on the fact that PC and nPC have been
+ written previously via PIOCSREG during a register flush. */
+
pi.prrun.pr_vaddr = (caddr_t) *(int *) &registers[REGISTER_BYTE (PC_REGNUM)];
+ pi.prrun.pr_flags != PRSVADDR;
+#endif
+
if (signo && !(signo == SIGSTOP && pi.nopass_next_sigstop))
{
set_proc_siginfo (&pi, signo);