From 8ce4f98b5a7d8460034f1abc1c8ee980e7453933 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Sun, 4 May 2008 14:12:34 +0000 Subject: * 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. --- gdb/aix-thread.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'gdb/aix-thread.c') diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c index 93da34c97ab..3377d50c625 100644 --- a/gdb/aix-thread.c +++ b/gdb/aix-thread.c @@ -1010,11 +1010,16 @@ aix_thread_wait (ptid_t ptid, struct target_waitstatus *status) return pid_to_ptid (-1); /* Check whether libpthdebug might be ready to be initialized. */ - if (!pd_active && status->kind == TARGET_WAITKIND_STOPPED && - status->value.sig == TARGET_SIGNAL_TRAP - && read_pc_pid (ptid) - - gdbarch_decr_pc_after_break (current_gdbarch) == pd_brk_addr) - return pd_activate (0); + if (!pd_active && status->kind == TARGET_WAITKIND_STOPPED + && status->value.sig == TARGET_SIGNAL_TRAP) + { + struct regcache *regcache = get_thread_regcache (ptid); + struct gdbarch *gdbarch = get_regcache_arch (regcache); + + if (regcache_read_pc (regcache) + - gdbarch_decr_pc_after_break (gdbarch) == pd_brk_addr) + return pd_activate (0); + } return pd_update (0); } -- cgit v1.2.1