From f26ae15b471aaddee81d9d6c03af1cb0f2081735 Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Thu, 2 Nov 2017 15:15:42 +0000 Subject: Construct readonly regcache without address space The address space is useless to readonly regcache, so this patch removes the parameter to construct readonly regcache. address_space was added in regcache by 6c95b8d, but for read-write regcache. regcache::aspace is used for various breakpoint/watchpoint checking, and these regcache are not read-only regcache. gdb: 2017-11-02 Yao Qi * frame.c (do_frame_register_read): Remove aspace. * jit.c (jit_frame_sniffer): Likwise. * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise. * regcache.c (regcache::regcache): Pass nullptr. (regcache_print): Caller updated. * regcache.h (regcache::regcache): Remove one constructor parameter aspace. --- gdb/regcache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/regcache.c') diff --git a/gdb/regcache.c b/gdb/regcache.c index ef05168..571aba1 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -211,7 +211,7 @@ do_cooked_read (void *src, int regnum, gdb_byte *buf) } regcache::regcache (readonly_t, const regcache &src) - : regcache (src.arch (), src.aspace (), true) + : regcache (src.arch (), nullptr, true) { gdb_assert (!src.m_readonly_p); save (do_cooked_read, (void *) &src); @@ -1574,7 +1574,7 @@ regcache_print (const char *args, enum regcache_dump_what what_to_dump) /* For the benefit of "maint print registers" & co when debugging an executable, allow dumping a regcache even when there is no thread selected / no registers. */ - regcache dummy_regs (target_gdbarch (), nullptr); + regcache dummy_regs (target_gdbarch ()); dummy_regs.dump (out, what_to_dump); } } -- cgit v1.1