* inftarg.c (child_thread_alive): New function to see if a
[deliverable/binutils-gdb.git] / gdb / procfs.c
index 1897bf421d416af29113548190df8ca6d11b43b0..699b8d2d7901d5b5f38112aae03f7e151342d18a 100644 (file)
@@ -1250,12 +1250,11 @@ unconditionally_kill_inferior (pi)
   ppid = pi->prstatus.pr_ppid;
 
   signo = SIGKILL;
-  ioctl (pi->fd, PIOCKILL, &signo);
 
 #ifdef PROCFS_NEED_PIOCSSIG_FOR_KILL
-  /* Alpha OSF/1 procfs needs an additional PIOCSSIG call with
-     a SIGKILL signal to kill the inferior, otherwise it might remain
-     stopped with a pending SIGKILL.
+  /* Alpha OSF/1 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
      died already.  */
   {
@@ -1269,6 +1268,8 @@ unconditionally_kill_inferior (pi)
     newsiginfo.si_uid = getuid ();
     ioctl (pi->fd, PIOCSSIG, &newsiginfo);
   }
+#else
+  ioctl (pi->fd, PIOCKILL, &signo);
 #endif
 
   close_proc_file (pi);
@@ -1459,12 +1460,8 @@ create_procinfo (pid)
   prfillset (&pi->prrun.pr_fault);
   prdelset (&pi->prrun.pr_fault, FLTPAGE);
 
-#ifdef PROCFS_DONT_TRACE_IFAULT
-  /* Tracing T_IFAULT under Alpha OSF/1 causes a `floating point enable'
-     fault from which we cannot continue (except by disabling the
-     tracing). We rely on the delivery of a SIGTRAP signal (which is traced)
-     for the other T_IFAULT faults if tracing them is disabled.  */
-  prdelset (&pi->prrun.pr_fault, T_IFAULT);
+#ifdef PROCFS_DONT_TRACE_FAULTS
+  premptyset (&pi->prrun.pr_fault);
 #endif
 
   if (ioctl (pi->fd, PIOCWSTOP, &pi->prstatus) < 0)
@@ -2066,12 +2063,8 @@ do_attach (pid)
   prfillset (&pi->prrun.pr_fault);
   prdelset (&pi->prrun.pr_fault, FLTPAGE);
 
-#ifdef PROCFS_DONT_TRACE_IFAULT
-  /* Tracing T_IFAULT under Alpha OSF/1 causes a `floating point enable'
-     fault from which we cannot continue (except by disabling the
-     tracing). We rely on the delivery of a SIGTRAP signal (which is traced)
-     for the other T_IFAULT faults if tracing them is disabled.  */
-  prdelset (&pi->prrun.pr_fault, T_IFAULT);
+#ifdef PROCFS_DONT_TRACE_FAULTS
+  premptyset (&pi->prrun.pr_fault);
 #endif
 
   if (ioctl (pi->fd, PIOCSFAULT, &pi->prrun.pr_fault))
@@ -2519,7 +2512,7 @@ set_proc_siginfo (pip, signo)
 
 #ifdef PROCFS_DONT_PIOCSSIG_CURSIG
   /* With Alpha OSF/1 procfs, the kernel gets really confused if it
-     receives a PIOCSSSIG with a signal identical to the current signal,
+     receives a PIOCSSIG with a signal identical to the current signal,
      it messes up the current signal. Work around the kernel bug.  */
   if (signo == pip -> prstatus.pr_cursig)
     return;
@@ -2996,7 +2989,8 @@ info_proc_siginfo (pip, summary)
                  (sip -> si_signo == SIGSEGV) ||
                  (sip -> si_signo == SIGBUS))
                {
-                 printf_filtered ("addr=%#x ", sip -> si_addr);
+                 printf_filtered ("addr=%#lx ",
+                                  (unsigned long) sip -> si_addr);
                }
              else if ((sip -> si_signo == SIGCHLD))
                {
@@ -3035,13 +3029,15 @@ info_proc_siginfo (pip, summary)
              if ((sip -> si_signo == SIGILL) ||
                  (sip -> si_signo == SIGFPE))
                {
-                 printf_filtered ("\t%-16#x %s.\n", sip -> si_addr,
+                 printf_filtered ("\t%#-16lx %s.\n",
+                                  (unsigned long) sip -> si_addr,
                                   "Address of faulting instruction");
                }
              else if ((sip -> si_signo == SIGSEGV) ||
                       (sip -> si_signo == SIGBUS))
                {
-                 printf_filtered ("\t%-16#x %s.\n", sip -> si_addr,
+                 printf_filtered ("\t%#-16lx %s.\n",
+                                  (unsigned long) sip -> si_addr,
                                   "Address of faulting memory reference");
                }
              else if ((sip -> si_signo == SIGCHLD))
@@ -3663,7 +3659,7 @@ procfs_can_run ()
 {
   return(1);
 }
-#ifdef TARGET_CAN_USE_HARDWARE_WATCHPOINT
+#ifdef TARGET_HAS_HARDWARE_WATCHPOINTS
 \f
 /* Insert a watchpoint */
 int
@@ -3769,6 +3765,7 @@ struct target_ops procfs_ops = {
   procfs_mourn_inferior,       /* to_mourn_inferior */
   procfs_can_run,              /* to_can_run */
   procfs_notice_signals,       /* to_notice_signals */
+  0                            /* to_thread_alive */
   procfs_stop,                 /* to_stop */
   process_stratum,             /* to_stratum */
   0,                           /* to_next */
This page took 0.024497 seconds and 4 git commands to generate.