* procfs.c (child_resume): Work around Solaris (on Sparc) lossage
authorStu Grossman <grossman@cygnus>
Thu, 25 Jun 1992 22:22:40 +0000 (22:22 +0000)
committerStu Grossman <grossman@cygnus>
Thu, 25 Jun 1992 22:22:40 +0000 (22:22 +0000)
where there is no place for nPC in prrun struct.

gdb/ChangeLog
gdb/procfs.c

index 5cf89e9a2d61230ddb17d33b4dc766f97d75882e..3b9aaae549b458e948a374d2f744c61c189f8d22 100644 (file)
@@ -1,3 +1,8 @@
+Thu Jun 25 15:18:42 1992  Stu Grossman  (grossman at cygnus.com)
+
+       * procfs.c (child_resume):  Work around Solaris (on Sparc) lossage
+       where there is no place for nPC in prrun struct.
+
 Thu Jun 25 12:06:00 1992  Fred Fish  (fnf@cygnus.com)
 
        * mipsread.c:  Pass NULL name pointer to init_type, not 0.
index 251ddb4786ac49c546229e7a26c57f827dd712b9..b205c66dfe5e97c6f891fae4e6e82333ade700ea 100644 (file)
@@ -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);
This page took 0.028984 seconds and 4 git commands to generate.