Add "make pdf" and "make install-pdf", from Brooks Moses
[deliverable/binutils-gdb.git] / gdb / rs6000-nat.c
index 4b2dc65733e5460614662d3f3700993d8b46b10a..97a53aafcffe21d43cef4203801866d968f5502b 100644 (file)
@@ -1,8 +1,8 @@
 /* IBM RS/6000 native-dependent code for GDB, the GNU debugger.
 
-   Copyright (C) 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996,
-   1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
-   Foundation, Inc.
+   Copyright (C) 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+   1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -35,6 +35,7 @@
 #include "regcache.h"
 #include "arch-utils.h"
 #include "ppc-tdep.h"
+#include "rs6000-tdep.h"
 #include "exec.h"
 
 #include <sys/ptrace.h>
@@ -525,17 +526,17 @@ child_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len,
 static void
 exec_one_dummy_insn (void)
 {
-#define        DUMMY_INSN_ADDR (TEXT_SEGMENT_BASE)+0x200
+#define        DUMMY_INSN_ADDR gdbarch_tdep (current_gdbarch)->text_segment_base+0x200
 
-  char shadow_contents[BREAKPOINT_MAX];                /* Stash old bkpt addr contents */
   int ret, status, pid;
   CORE_ADDR prev_pc;
+  void *bp;
 
   /* We plant one dummy breakpoint into DUMMY_INSN_ADDR address. We
      assume that this address will never be executed again by the real
      code. */
 
-  target_insert_breakpoint (DUMMY_INSN_ADDR, shadow_contents);
+  bp = deprecated_insert_raw_breakpoint (DUMMY_INSN_ADDR);
 
   /* You might think this could be done with a single ptrace call, and
      you'd be correct for just about every platform I've ever worked
@@ -559,7 +560,7 @@ exec_one_dummy_insn (void)
   while (pid != PIDGET (inferior_ptid));
 
   write_pc (prev_pc);
-  target_remove_breakpoint (DUMMY_INSN_ADDR, shadow_contents);
+  deprecated_remove_raw_breakpoint (bp);
 }
 
 /* Fetch registers from the register section in core bfd. */
@@ -993,8 +994,8 @@ vmap_exec (void)
 /* Set the current architecture from the host running GDB.  Called when
    starting a child process. */
 
-static void
-set_host_arch (int pid)
+void
+rs6000_create_inferior (int pid)
 {
   enum bfd_architecture arch;
   unsigned long mach;
@@ -1037,7 +1038,7 @@ set_host_arch (int pid)
 
   if (!gdbarch_update_p (info))
     internal_error (__FILE__, __LINE__,
-                   _("set_host_arch: failed to select architecture"));
+                   _("rs6000_create_inferior: failed to select architecture"));
 }
 
 \f
@@ -1248,9 +1249,5 @@ _initialize_core_rs6000 (void)
      when calling functions in the inferior.  */
   rs6000_find_toc_address_hook = find_toc_address;
 
-  /* Initialize hook in rs6000-tdep.c to set the current architecture
-     when starting a child process.  */
-  rs6000_set_host_arch_hook = set_host_arch;
-
   deprecated_add_core_fns (&rs6000_core_fns);
 }
This page took 0.024551 seconds and 4 git commands to generate.