* config/rs6000/nm-rs6000.h (TARGET_CREATE_INFERIOR_HOOK): Remove.
authorUlrich Weigand <uweigand@de.ibm.com>
Fri, 27 Apr 2007 13:23:47 +0000 (13:23 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Fri, 27 Apr 2007 13:23:47 +0000 (13:23 +0000)
* fork-child.c (fork_inferior): Don't call TARGET_CREATE_INFERIOR_HOOK.
* rs6000-nat.c (super_create_inferior): New variable.
(rs6000_create_inferior): Make static.  Adapt argument list.  Call
original version of create_inferior via super_create_inferior.
(_initialize_core_rs6000): Install to_create_inferior target method.

gdb/ChangeLog
gdb/config/rs6000/nm-rs6000.h
gdb/fork-child.c
gdb/rs6000-nat.c
gdb/target.h

index b8e256cbc71130c43b879c0225f6f9cc375467d8..2abe05d75a44adfdb860243ebe69006e9b400995 100644 (file)
@@ -1,3 +1,12 @@
+2007-04-27  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * config/rs6000/nm-rs6000.h (TARGET_CREATE_INFERIOR_HOOK): Remove.
+       * fork-child.c (fork_inferior): Don't call TARGET_CREATE_INFERIOR_HOOK.
+       * rs6000-nat.c (super_create_inferior): New variable.
+       (rs6000_create_inferior): Make static.  Adapt argument list.  Call
+       original version of create_inferior via super_create_inferior.
+       (_initialize_core_rs6000): Install to_create_inferior target method.
+
 2007-04-27  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * aix-thread.c (aix_thread_xfer_memory): Replace by ...
index 96904911895b534397bd154df9407418fff37c1a..2d8542b78ded86794051e6c4f0831d7c441677f9 100644 (file)
@@ -64,8 +64,3 @@ extern char *xcoff_solib_address (CORE_ADDR);
   /* A normal waitstatus.  Let the usual macros deal with it.  */ \
   0)
 
-/* Notice when a new child process is started. */
-
-#define TARGET_CREATE_INFERIOR_HOOK rs6000_create_inferior
-extern void rs6000_create_inferior (int);
-
index 9a193cd28d1c779988f86ee46cd5306bcde182ba..37fe9274b25a550afea8e0d63d24bddc98f59234 100644 (file)
@@ -398,11 +398,6 @@ fork_inferior (char *exec_file_arg, char *allargs, char **env,
   /* We are now in the child process of interest, having exec'd the
      correct program, and are poised at the first instruction of the
      new program.  */
-
-  /* Allow target dependent code to play with the new process.  This
-     might be used to have target-specific code initialize a variable
-     in the new process prior to executing the first instruction.  */
-  TARGET_CREATE_INFERIOR_HOOK (pid);
 }
 
 /* Accept NTRAPS traps from the inferior.  */
index 986f9a0cc8f12a42d4e192df37ca8b3a64b39091..365463a1ddc6b0f03d3f3aca8478d02cc72d1632 100644 (file)
@@ -999,14 +999,18 @@ vmap_exec (void)
 /* Set the current architecture from the host running GDB.  Called when
    starting a child process. */
 
-void
-rs6000_create_inferior (int pid)
+static void (*super_create_inferior) (char *exec_file, char *allargs,
+                                     char **env, int from_tty);
+static void
+rs6000_create_inferior (char *exec_file, char *allargs, char **env, int from_tty)
 {
   enum bfd_architecture arch;
   unsigned long mach;
   bfd abfd;
   struct gdbarch_info info;
 
+  super_create_inferior (exec_file, allargs, env, from_tty);
+
   if (__power_rs ())
     {
       arch = bfd_arch_rs6000;
@@ -1250,6 +1254,10 @@ _initialize_core_rs6000 (void)
   t->to_fetch_registers = rs6000_fetch_inferior_registers;
   t->to_store_registers = rs6000_store_inferior_registers;
   t->to_xfer_partial = rs6000_xfer_partial;
+
+  super_create_inferior = t->to_create_inferior;
+  t->to_create_inferior = rs6000_create_inferior;
+
   add_target (t);
 
   /* Initialize hook in rs6000-tdep.c for determining the TOC address
index d9f1ca17ceab6aa6d13a48ac4be21847dfc6860b..2420b2ed76220371629c2553b84643ec5159f2ed 100644 (file)
@@ -1112,12 +1112,6 @@ extern void (*deprecated_target_new_objfile_hook) (struct objfile *);
 #define target_get_thread_local_address_p() \
     (target_get_thread_local_address != NULL)
 
-/* Hook to call target dependent code just after inferior target process has
-   started.  */
-
-#ifndef TARGET_CREATE_INFERIOR_HOOK
-#define TARGET_CREATE_INFERIOR_HOOK(PID)
-#endif
 
 /* Hardware watchpoint interfaces.  */
 
This page took 0.030401 seconds and 4 git commands to generate.