aboutsummaryrefslogtreecommitdiff
path: root/gdb/rs6000-nat.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-04-27 13:23:47 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-04-27 13:23:47 +0000
commit1f480a5e28ef0f10bb3236b5088a14346e7b9b20 (patch)
tree6c580792a2372b7cf66c130605c9a719a2322205 /gdb/rs6000-nat.c
parent037a727e3d7574f797adebad86e3eb8e37899be4 (diff)
downloadgdb-1f480a5e28ef0f10bb3236b5088a14346e7b9b20.zip
gdb-1f480a5e28ef0f10bb3236b5088a14346e7b9b20.tar.gz
gdb-1f480a5e28ef0f10bb3236b5088a14346e7b9b20.tar.bz2
* 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.
Diffstat (limited to 'gdb/rs6000-nat.c')
-rw-r--r--gdb/rs6000-nat.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index 986f9a0..365463a 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -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