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/mips-tdep.c | |
parent | a01bda5221f75031ea2b6d05860e46c7b9b58b55 (diff) | |
download | gdb-8b86c9592117b3ba52921af11868dc0b81ce4858.zip gdb-8b86c9592117b3ba52921af11868dc0b81ce4858.tar.gz gdb-8b86c9592117b3ba52921af11868dc0b81ce4858.tar.bz2 |
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/mips-tdep.c')
-rw-r--r-- | gdb/mips-tdep.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 4b19896..20bd5d3 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -6598,7 +6598,6 @@ mips_single_step_through_delay (struct gdbarch *gdbarch, { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR pc = get_frame_pc (frame); - struct address_space *aspace; enum mips_isa isa; ULONGEST insn; int status; @@ -6616,7 +6615,9 @@ mips_single_step_through_delay (struct gdbarch *gdbarch, /* _has_delay_slot above will have validated the read. */ insn = mips_fetch_instruction (gdbarch, isa, pc, NULL); size = mips_insn_size (isa, insn); - aspace = get_frame_address_space (frame); + + const address_space *aspace = get_frame_address_space (frame); + return breakpoint_here_p (aspace, pc + size) != no_breakpoint_here; } |