diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2008-05-04 14:12:34 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2008-05-04 14:12:34 +0000 |
commit | 515630c5e5a3b481867b81031930664f8d1d9b77 (patch) | |
tree | 97c8d75819dfa7fc34fe4d37b33a9986051c1bf4 /gdb/linux-nat.c | |
parent | ebd3bcc1327e6a7de6daf6536134cb20be9c2cfd (diff) | |
download | gdb-515630c5e5a3b481867b81031930664f8d1d9b77.zip gdb-515630c5e5a3b481867b81031930664f8d1d9b77.tar.gz gdb-515630c5e5a3b481867b81031930664f8d1d9b77.tar.bz2 |
* inferior.h (read_pc_pid, write_pc_pid): Remove.
* regcache.h (regcache_read_pc, regcache_write_pc): Add prototypes.
* regcache.c (read_pc_pid): Remove, replace by ...
(regcache_read_pc): ... this function.
(write_pc_pid): Remove, replace by ...
(regcache_write_pc): ... this function.
(read_pc, write_pc): Update.
* infrun.c (displaced_step_prepare): Replace read_pc_pid and
write_pc_pid by regcache_read_pc and regcache_write_pc.
(displaced_step_fixup): Likewise.
(resume): Likewise. Use regcache arch instead of current_gdbarch.
(prepare_to_proceed): Likewise.
(proceed): Likewise.
(adjust_pc_after_break): Likewise.
(handle_inferior_event): Likewise.
* linux-nat.c (cancel_breakpoint): Likewise.
* linux-thread-db.c (check_event): Likewise.
* aix-thread.c (aix_thread_wait): Likewise.
* tracepoint.c (trace_dump_command): Likewise.
Diffstat (limited to 'gdb/linux-nat.c')
-rw-r--r-- | gdb/linux-nat.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 4b6c614..5d15d42 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -2157,9 +2157,12 @@ cancel_breakpoint (struct lwp_info *lp) delete or disable the breakpoint, but the LWP will have already tripped on it. */ - if (breakpoint_inserted_here_p (read_pc_pid (lp->ptid) - - gdbarch_decr_pc_after_break - (current_gdbarch))) + struct regcache *regcache = get_thread_regcache (lp->ptid); + struct gdbarch *gdbarch = get_regcache_arch (regcache); + CORE_ADDR pc; + + pc = regcache_read_pc (regcache) - gdbarch_decr_pc_after_break (gdbarch); + if (breakpoint_inserted_here_p (pc)) { if (debug_linux_nat) fprintf_unfiltered (gdb_stdlog, @@ -2167,10 +2170,9 @@ cancel_breakpoint (struct lwp_info *lp) target_pid_to_str (lp->ptid)); /* Back up the PC if necessary. */ - if (gdbarch_decr_pc_after_break (current_gdbarch)) - write_pc_pid (read_pc_pid (lp->ptid) - gdbarch_decr_pc_after_break - (current_gdbarch), - lp->ptid); + if (gdbarch_decr_pc_after_break (gdbarch)) + regcache_write_pc (regcache, pc); + return 1; } return 0; |