X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Frs6000-nat.c;h=9f8a43f8d1be9d94b4363ecdaacf4b2fe45426ff;hb=d30acaa715bbe0d2e628831b1eabca166114652e;hp=27632d399bf984e51503b72781708817ad7e8a34;hpb=d5af19bafb85ea444b237ed2eab15aebeac1adca;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c index 27632d399b..9f8a43f8d1 100644 --- a/gdb/rs6000-nat.c +++ b/gdb/rs6000-nat.c @@ -1,7 +1,7 @@ /* 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, 2007, 2008 + 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of GDB. @@ -37,6 +37,7 @@ #include "rs6000-tdep.h" #include "exec.h" #include "observer.h" +#include "xcoffread.h" #include #include @@ -333,7 +334,8 @@ store_register (const struct regcache *regcache, int regno) REGNO otherwise. */ static void -rs6000_fetch_inferior_registers (struct regcache *regcache, int regno) +rs6000_fetch_inferior_registers (struct target_ops *ops, + struct regcache *regcache, int regno) { struct gdbarch *gdbarch = get_regcache_arch (regcache); if (regno != -1) @@ -375,7 +377,8 @@ rs6000_fetch_inferior_registers (struct regcache *regcache, int regno) Otherwise, REGNO specifies which register (so we can save time). */ static void -rs6000_store_inferior_registers (struct regcache *regcache, int regno) +rs6000_store_inferior_registers (struct target_ops *ops, + struct regcache *regcache, int regno) { struct gdbarch *gdbarch = get_regcache_arch (regcache); if (regno != -1) @@ -517,7 +520,8 @@ rs6000_xfer_partial (struct target_ops *ops, enum target_object object, the status in *OURSTATUS. */ static ptid_t -rs6000_wait (ptid_t ptid, struct target_waitstatus *ourstatus) +rs6000_wait (struct target_ops *ops, + ptid_t ptid, struct target_waitstatus *ourstatus) { pid_t pid; int status, save_errno; @@ -525,7 +529,6 @@ rs6000_wait (ptid_t ptid, struct target_waitstatus *ourstatus) do { set_sigint_trap (); - set_sigio_trap (); do { @@ -534,7 +537,6 @@ rs6000_wait (ptid_t ptid, struct target_waitstatus *ourstatus) } while (pid == -1 && errno == EINTR); - clear_sigio_trap (); clear_sigint_trap (); if (pid == -1) @@ -546,7 +548,7 @@ rs6000_wait (ptid_t ptid, struct target_waitstatus *ourstatus) /* Claim it exited with unknown signal. */ ourstatus->kind = TARGET_WAITKIND_SIGNALLED; ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN; - return minus_one_ptid; + return inferior_ptid; } /* Ignore terminated detached child processes. */ @@ -966,17 +968,18 @@ vmap_exec (void) /* Set the current architecture from the host running GDB. Called when starting a child process. */ -static void (*super_create_inferior) (char *exec_file, char *allargs, - char **env, int from_tty); +static void (*super_create_inferior) (struct target_ops *,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) +rs6000_create_inferior (struct target_ops * ops, 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); + super_create_inferior (ops, exec_file, allargs, env, from_tty); if (__power_rs ()) { @@ -1191,16 +1194,15 @@ static CORE_ADDR find_toc_address (CORE_ADDR pc) { struct vmap *vp; - extern CORE_ADDR get_toc_offset (struct objfile *); /* xcoffread.c */ for (vp = vmap; vp; vp = vp->nxt) { if (pc >= vp->tstart && pc < vp->tend) { /* vp->objfile is only NULL for the exec file. */ - return vp->dstart + get_toc_offset (vp->objfile == NULL - ? symfile_objfile - : vp->objfile); + return vp->dstart + xcoff_get_toc_offset (vp->objfile == NULL + ? symfile_objfile + : vp->objfile); } } error (_("Unable to find TOC entry for pc %s."), hex_string (pc));