aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-thread-db.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2008-05-04 14:12:34 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2008-05-04 14:12:34 +0000
commit515630c5e5a3b481867b81031930664f8d1d9b77 (patch)
tree97c8d75819dfa7fc34fe4d37b33a9986051c1bf4 /gdb/linux-thread-db.c
parentebd3bcc1327e6a7de6daf6536134cb20be9c2cfd (diff)
downloadbinutils-515630c5e5a3b481867b81031930664f8d1d9b77.zip
binutils-515630c5e5a3b481867b81031930664f8d1d9b77.tar.gz
binutils-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-thread-db.c')
-rw-r--r--gdb/linux-thread-db.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 83632d0..c7aaf60 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -747,6 +747,8 @@ thread_db_detach (char *args, int from_tty)
static void
check_event (ptid_t ptid)
{
+ struct regcache *regcache = get_thread_regcache (ptid);
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
td_event_msg_t msg;
td_thrinfo_t ti;
td_err_e err;
@@ -754,7 +756,8 @@ check_event (ptid_t ptid)
int loop = 0;
/* Bail out early if we're not at a thread event breakpoint. */
- stop_pc = read_pc_pid (ptid) - gdbarch_decr_pc_after_break (current_gdbarch);
+ stop_pc = regcache_read_pc (regcache)
+ - gdbarch_decr_pc_after_break (gdbarch);
if (stop_pc != td_create_bp_addr && stop_pc != td_death_bp_addr)
return;