diff options
author | Yao Qi <yao.qi@linaro.org> | 2017-11-02 15:15:42 +0000 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2017-11-02 15:15:42 +0000 |
commit | 8b86c9592117b3ba52921af11868dc0b81ce4858 (patch) | |
tree | a8c5f1df5458f489d4edc05e8a13d7f89e2f48f2 /gdb/record-full.c | |
parent | a01bda5221f75031ea2b6d05860e46c7b9b58b55 (diff) |
const-fy regcache::m_aspace
regcache::m_aspace is a const, never changed during the lifetime of
regcache object. The address_space object is a const object too.
gdb:
2017-11-02 Yao Qi <yao.qi@linaro.org>
* breakpoint.c (insert_single_step_breakpoints): Update.
* frame.c (struct frame_info) <aspace>: Add const.
(frame_save_as_regcache): Add const.
(get_frame_address_space): Return const address_space *.
* frame.h (get_frame_address_space): Update declaration.
* infrun.c (struct step_over_info) <aspace>: Add const.
(set_step_over_info): Make aspace const.
(displaced_step_prepare_throw): Change variable const.
(resume): Likewise.
(proceed): Likewise.
(adjust_pc_after_break): Likewise.
(save_waitstatus): Likewise.
(handle_signal_stop): Likewise.
(keep_going_pass_signal): Likewise.
* jit.c (jit_frame_sniffer): Add const.
* mips-tdep.c (mips_single_step_through_delay): Likewise.
* ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
* record-full.c (record_full_wait_1): Likewise.
* regcache.c (regcache::regcache): Change parameter to const.
* regcache.h (regcache::regcache): Likewise.
(regcache::aspace): Return const address_space *.
(regcache) <m_aspace>: Add const.
Diffstat (limited to 'gdb/record-full.c')
-rw-r--r-- | gdb/record-full.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/record-full.c b/gdb/record-full.c index 0488b7148a..6fc29d6170 100644 --- a/gdb/record-full.c +++ b/gdb/record-full.c @@ -1098,7 +1098,6 @@ record_full_wait_1 (struct target_ops *ops, && status->value.sig == GDB_SIGNAL_TRAP) { struct regcache *regcache; - struct address_space *aspace; enum target_stop_reason *stop_reason_p = &record_full_stop_reason; @@ -1109,7 +1108,7 @@ record_full_wait_1 (struct target_ops *ops, registers_changed (); regcache = get_current_regcache (); tmp_pc = regcache_read_pc (regcache); - aspace = regcache->aspace (); + const struct address_space *aspace = regcache->aspace (); if (target_stopped_by_watchpoint ()) { @@ -1172,7 +1171,7 @@ record_full_wait_1 (struct target_ops *ops, { struct regcache *regcache = get_current_regcache (); struct gdbarch *gdbarch = regcache->arch (); - struct address_space *aspace = regcache->aspace (); + const struct address_space *aspace = regcache->aspace (); int continue_flag = 1; int first_record_full_end = 1; struct cleanup *old_cleanups |