2003-08-02 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / hppah-nat.c
index 8ff6c28a7bcad2888c41a9cf77cf72d0135894b2..380a901e9821c10d1008d03a7aeba8055a91e33d 100644 (file)
@@ -31,6 +31,7 @@
 #include "gdbcore.h"
 #include "gdb_wait.h"
 #include "regcache.h"
+#include "gdb_string.h"
 #include <signal.h>
 
 extern CORE_ADDR text_end;
@@ -189,7 +190,7 @@ store_inferior_registers (int regno)
 static void
 fetch_register (int regno)
 {
-  char buf[MAX_REGISTER_RAW_SIZE];
+  char buf[MAX_REGISTER_SIZE];
   unsigned int addr, len, offset;
   int i;
 
@@ -423,7 +424,9 @@ child_follow_fork (int follow_child)
        }
 
       /* Detach from the child. */
-      target_require_detach (child_pid, "", 1);
+      printf_unfiltered ("Detaching after fork from %s\n",
+                        target_pid_to_str (pid_to_ptid (child_pid)));
+      hppa_require_detach (child_pid, 0);
 
       /* The parent and child of a vfork share the same address space.
         Also, on some targets the order in which vfork and exec events
@@ -465,8 +468,6 @@ child_follow_fork (int follow_child)
     }
   else
     {
-      char child_pid_spelling[40];
-
       /* Needed to keep the breakpoint lists in sync.  */
       if (! has_vforked)
        detach_breakpoints (child_pid);
@@ -483,10 +484,10 @@ child_follow_fork (int follow_child)
       target_detach (NULL, 1);
 
       /* Attach to the child. */
+      printf_unfiltered ("Attaching after fork to %s\n",
+                        target_pid_to_str (pid_to_ptid (child_pid)));
+      hppa_require_attach (child_pid);
       inferior_ptid = pid_to_ptid (child_pid);
-      sprintf (child_pid_spelling, "%d", child_pid);
-
-      target_require_attach (child_pid_spelling, 1);
 
       /* If we vforked, then we've also execed by now.  The exec will be
         reported momentarily.  follow_exec () will handle breakpoints, so
@@ -785,8 +786,6 @@ startup_semaphore_t;
 
 static startup_semaphore_t startup_semaphore;
 
-extern int parent_attach_all (int, PTRACE_ARG3_TYPE, int);
-
 #ifdef PT_SETTRC
 /* This function causes the caller's process to be traced by its
    parent.  This is intended to be called after GDB forks itself,
@@ -907,14 +906,13 @@ hppa_insert_hw_watchpoint (int pid, CORE_ADDR start, LONGEST len, int type)
 }
 
 int
-hppa_remove_hw_watchpoint (int pid, CORE_ADDR start, LONGEST len,
-                          enum bptype type)
+hppa_remove_hw_watchpoint (int pid, CORE_ADDR start, LONGEST len, int type)
 {
   error ("Hardware watchpoints not implemented on this platform.");
 }
 
 int
-hppa_can_use_hw_watchpoint (enum bptype type, int cnt, enum bptype ot)
+hppa_can_use_hw_watchpoint (int type, int cnt, int ot)
 {
   return 0;
 }
@@ -932,16 +930,6 @@ hppa_pid_or_tid_to_str (ptid_t id)
   return child_pid_to_str (id);
 }
 
-/* This function has no meaning in a non-threaded world.  Thus, we
-   return 0 (FALSE).  See the use of "hppa_prepare_to_proceed" in
-   hppa-tdep.c. */
-
-pid_t
-hppa_switched_threads (pid_t pid)
-{
-  return (pid_t) 0;
-}
-
 void
 hppa_ensure_vforking_parent_remains_stopped (int pid)
 {
@@ -1334,7 +1322,7 @@ child_pid_to_exec_file (int pid)
   int name_index;
   int i;
   ptid_t saved_inferior_ptid;
-  boolean done;
+  int done;
 
 #ifdef PT_GET_PROCESS_PATHNAME
   /* As of 10.x HP-UX, there's an explicit request to get the pathname. */
This page took 0.02508 seconds and 4 git commands to generate.