summaryrefslogtreecommitdiff
path: root/gdb/rs6000-nat.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2009-05-05 13:24:49 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2009-05-05 13:24:49 +0000
commitfb14de7bbddf9dc2f97af953b95b5aa5ea9889c4 (patch)
tree8c3aed3cae160e56394d2cdd183b3427f5e92dd0 /gdb/rs6000-nat.c
parent738a79f66913b32e392c15c1373c1ea39f808914 (diff)
downloadbinutils-gdb-fb14de7bbddf9dc2f97af953b95b5aa5ea9889c4.tar.gz
* inferior.h (read_pc, write_pc): Remove.
* regcache.c (read_pc, write_pc): Remove. * infrun.c (displaced_step_fixup): Use regcache_read_pc instead of read_pc. (handle_inferior_event): Use regcache_read_pc instead of read_pc when determining value of stop_pc. Replace subsequent uses of read_pc by inspecting already-retrieved stop_pc value. (keep_going): Use regcache_read_pc instead of read_pc. * breakpoint.c (watchpoint_check): Use current frame architecture and PC instead of current_gdbarch and read_pc (). * tracepoint.c (set_traceframe_context): Replace PC argument with FRAME argument. (trace_start_command, finish_tfind_command): Update calls. (finish_tfind_command): Compare frame IDs to identify transitions between frames. (trace_find_pc_command): Use regcache_read_pc instead of read_pc. * rs6000-nat.c (exec_one_dummy_insn): Pass in regcache instead of gdbarch. Use regcache_read_pc and regcache_write_pc instead of read_pc and write_pc. (store_register): Make regcache argument non-const. Update call to exec_one_dummy_insn. * thread.c (switch_to_thread): Use regcache_read_pc instead of read_pc. * infcmd.c (post_create_inferior): Likewise. * solib-darwin.c (darwin_solib_create_inferior_hook): Likewise. * solib-pa64.c (pa64_solib_create_inferior_hook): Likewise. * solib-sunos.c (sunos_solib_create_inferior_hook): Likewise. * solib-svr4.c (enable_break, svr4_relocate_main_executable): Likewise. * linux-fork.c (fork_load_infrun_state): Likewise. * hppa-hpux-tdep.c (hppa_hpux_push_dummy_code): Likewise. * record.c (record_wait): Likewise. * procfs.c (procfs_wait): Likewise. * remote-mips.c (common_open, mips_wait): Likewise. * remote-m32r-sdi.c (m32r_resume): Likewise. * symfile.c (generic_load): Use regcache_write_pc instead of write_pc. * monitor.c (monitor_create_inferior, monitor_load): Likewise. * m32r-rom.c (m32r_load, m32r_upload_command): Likewise. * remote-m32r-sdi.c (m32r_create_inferior, m32r_load): Likewise. * remote-mips.c (mips_create_inferior, mips_load): Likewise. * solib-darwin.c: Include "regcache.h". * solib-pa64.c: Include "regcache.h". * solib-svr4.c: Include "regcache.h.". * symfile.c: Do not mention read_pc or write_pc in comments. * dink32-rom.c: Likewise. * m32r-rom.c: Likewise. * mips-tdep.c: Likewise.
Diffstat (limited to 'gdb/rs6000-nat.c')
-rw-r--r--gdb/rs6000-nat.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index 52411830e4c..8aeef25b5c6 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -130,7 +130,7 @@ static int objfile_symbol_add (void *);
static void vmap_symtab (struct vmap *);
-static void exec_one_dummy_insn (struct gdbarch *);
+static void exec_one_dummy_insn (struct regcache *);
extern void fixup_breakpoints (CORE_ADDR low, CORE_ADDR high, CORE_ADDR delta);
@@ -267,7 +267,7 @@ fetch_register (struct regcache *regcache, int regno)
/* Store register REGNO back into the inferior. */
static void
-store_register (const struct regcache *regcache, int regno)
+store_register (struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
int addr[MAX_REGISTER_SIZE];
@@ -303,7 +303,7 @@ store_register (const struct regcache *regcache, int regno)
Otherwise the following ptrace(2) calls will mess up user stack
since kernel will get confused about the bottom of the stack
(%sp). */
- exec_one_dummy_insn (gdbarch);
+ exec_one_dummy_insn (regcache);
/* The PT_WRITE_GPR operation is rather odd. For 32-bit inferiors,
the register's value is passed by value, but for 64-bit inferiors,
@@ -577,7 +577,7 @@ rs6000_wait (struct target_ops *ops,
including u_area. */
static void
-exec_one_dummy_insn (struct gdbarch *gdbarch)
+exec_one_dummy_insn (struct regcache *regcache)
{
#define DUMMY_INSN_ADDR AIX_TEXT_SEGMENT_BASE+0x200
@@ -596,8 +596,8 @@ exec_one_dummy_insn (struct gdbarch *gdbarch)
on. However, rs6000-ibm-aix4.1.3 seems to have screwed this up --
the inferior never hits the breakpoint (it's also worth noting
powerpc-ibm-aix4.1.3 works correctly). */
- prev_pc = read_pc ();
- write_pc (DUMMY_INSN_ADDR);
+ prev_pc = regcache_read_pc (regcache);
+ regcache_write_pc (regcache, DUMMY_INSN_ADDR);
if (ARCH64 ())
ret = rs6000_ptrace64 (PT_CONTINUE, PIDGET (inferior_ptid), 1, 0, NULL);
else
@@ -612,7 +612,7 @@ exec_one_dummy_insn (struct gdbarch *gdbarch)
}
while (pid != PIDGET (inferior_ptid));
- write_pc (prev_pc);
+ regcache_write_pc (regcache, prev_pc);
deprecated_remove_raw_breakpoint (bp);
}