+2017-11-02 Yao Qi <yao.qi@linaro.org>
+
+ * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
+ * frame.c (create_sentinel_frame): Likewise.
+ * infrun.c (displaced_step_prepare_throw): Likewise.
+ (resume): Likewise.
+ (thread_still_needs_step_over_bp): Likewise.
+ (proceed): Likewise.
+ (do_target_wait): Likewise.
+ (adjust_pc_after_break): Likewise.
+ (handle_syscall_event): Likewise.
+ (save_waitstatus): Likewise.
+ (handle_inferior_event_1): Likewise.
+ (handle_signal_stop): Likewise.
+ (keep_going_pass_signal): Likewise.
+ * linux-nat.c (status_callback): Likewise.
+ (save_stop_reason): Likewise.
+ (resume_stopped_resumed_lwps): Likewise.
+ * record-full.c (record_full_exec_insn): Likewise.
+ (record_full_wait_1): Likewise.
+ * regcache.c (get_regcache_aspace): Remove.
+ * regcache.h (get_regcache_aspace): Remove.
+
2017-11-02 Yao Qi <yao.qi@linaro.org>
* regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
struct thread_info *tp = find_thread_ptid (ptid);
struct regcache *regcache = get_thread_regcache (ptid);
struct gdbarch *gdbarch = regcache->arch ();
- struct address_space *aspace = get_regcache_aspace (regcache);
+ struct address_space *aspace = regcache->aspace ();
CORE_ADDR original, copy;
ULONGEST len;
struct displaced_step_closure *closure;
struct gdbarch *gdbarch = regcache->arch ();
struct thread_info *tp = inferior_thread ();
CORE_ADDR pc = regcache_read_pc (regcache);
- struct address_space *aspace = get_regcache_aspace (regcache);
+ struct address_space *aspace = regcache->aspace ();
ptid_t resume_ptid;
/* This represents the user's step vs continue request. When
deciding whether "set scheduler-locking step" applies, it's the
if (target_is_non_stop_p ())
stop_all_threads ();
- set_step_over_info (get_regcache_aspace (regcache),
+ set_step_over_info (regcache->aspace (),
regcache_read_pc (regcache), 0, tp->global_num);
step = maybe_software_singlestep (gdbarch, pc);
{
struct regcache *regcache = get_thread_regcache (tp->ptid);
- if (breakpoint_here_p (get_regcache_aspace (regcache),
+ if (breakpoint_here_p (regcache->aspace (),
regcache_read_pc (regcache))
== ordinary_breakpoint_here)
return 1;
regcache = get_current_regcache ();
gdbarch = regcache->arch ();
- aspace = get_regcache_aspace (regcache);
+ aspace = regcache->aspace ();
pc = regcache_read_pc (regcache);
tp = inferior_thread ();
paddress (gdbarch, pc));
discard = 1;
}
- else if (!breakpoint_inserted_here_p (get_regcache_aspace (regcache), pc))
+ else if (!breakpoint_inserted_here_p (regcache->aspace (), pc))
{
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog,
if (decr_pc == 0)
return;
- aspace = get_regcache_aspace (regcache);
+ aspace = regcache->aspace ();
/* Find the location where (if we've hit a breakpoint) the
breakpoint would be. */
syscall_number);
ecs->event_thread->control.stop_bpstat
- = bpstat_stop_status (get_regcache_aspace (regcache),
+ = bpstat_stop_status (regcache->aspace (),
stop_pc, ecs->ptid, &ecs->ws);
if (handle_stop_requested (ecs))
tp->suspend.waitstatus_pending_p = 1;
regcache = get_thread_regcache (tp->ptid);
- aspace = get_regcache_aspace (regcache);
+ aspace = regcache->aspace ();
if (ws->kind == TARGET_WAITKIND_STOPPED
&& ws->value.sig == GDB_SIGNAL_TRAP)
{
struct regcache *regcache = get_thread_regcache (ecs->ptid);
- if (breakpoint_inserted_here_p (get_regcache_aspace (regcache),
+ if (breakpoint_inserted_here_p (regcache->aspace (),
regcache_read_pc (regcache)))
{
if (debug_infrun)
handle_solib_event ();
ecs->event_thread->control.stop_bpstat
- = bpstat_stop_status (get_regcache_aspace (regcache),
+ = bpstat_stop_status (regcache->aspace (),
stop_pc, ecs->ptid, &ecs->ws);
if (handle_stop_requested (ecs))
stop_pc = regcache_read_pc (get_thread_regcache (ecs->ptid));
ecs->event_thread->control.stop_bpstat
- = bpstat_stop_status (get_regcache_aspace (get_current_regcache ()),
+ = bpstat_stop_status (get_current_regcache ()->aspace (),
stop_pc, ecs->ptid, &ecs->ws);
if (handle_stop_requested (ecs))
ecs->event_thread = inferior_thread ();
ecs->event_thread->control.stop_bpstat
- = bpstat_stop_status (get_regcache_aspace (get_current_regcache ()),
+ = bpstat_stop_status (get_current_regcache ()->aspace (),
stop_pc, ecs->ptid, &ecs->ws);
/* Note that this may be referenced from inside
CORE_ADDR pc;
regcache = get_thread_regcache (ecs->ptid);
- aspace = get_regcache_aspace (regcache);
+ aspace = regcache->aspace ();
pc = regcache_read_pc (regcache);
/* However, before doing so, if this single-step breakpoint was
if (ecs->event_thread->control.step_range_end != 1)
{
struct address_space *aspace =
- get_regcache_aspace (get_thread_regcache (ecs->ptid));
+ get_thread_regcache (ecs->ptid)->aspace ();
/* skip_inline_frames is expensive, so we avoid it if we can
determine that the address is one where functions cannot have
/* See if there is a breakpoint/watchpoint/catchpoint/etc. that
handles this event. */
ecs->event_thread->control.stop_bpstat
- = bpstat_stop_status (get_regcache_aspace (get_current_regcache ()),
+ = bpstat_stop_status (get_current_regcache ()->aspace (),
stop_pc, ecs->ptid, &ecs->ws);
/* Following in case break condition called a
if (remove_bp
&& (remove_wps || !use_displaced_stepping (ecs->event_thread)))
{
- set_step_over_info (get_regcache_aspace (regcache),
+ set_step_over_info (regcache->aspace (),
regcache_read_pc (regcache), remove_wps,
ecs->event_thread->global_num);
}
}
#if !USE_SIGTRAP_SIGINFO
- else if (!breakpoint_inserted_here_p (get_regcache_aspace (regcache), pc))
+ else if (!breakpoint_inserted_here_p (regcache->aspace (), pc))
{
if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog,
}
#else
if ((!lp->step || lp->stop_pc == sw_bp_pc)
- && software_breakpoint_inserted_here_p (get_regcache_aspace (regcache),
+ && software_breakpoint_inserted_here_p (regcache->aspace (),
sw_bp_pc))
{
/* The LWP was either continued, or stepped a software
lp->stop_reason = TARGET_STOPPED_BY_SW_BREAKPOINT;
}
- if (hardware_breakpoint_inserted_here_p (get_regcache_aspace (regcache), pc))
+ if (hardware_breakpoint_inserted_here_p (regcache->aspace (), pc))
lp->stop_reason = TARGET_STOPPED_BY_HW_BREAKPOINT;
if (lp->stop_reason == TARGET_STOPPED_BY_NO_REASON)
immediately, and we're not waiting for this LWP. */
if (!ptid_match (lp->ptid, *wait_ptid_p))
{
- if (breakpoint_inserted_here_p (get_regcache_aspace (regcache), pc))
+ if (breakpoint_inserted_here_p (regcache->aspace (), pc))
leave_stopped = 1;
}