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/frame.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gdb/frame.c') diff --git a/gdb/frame.c b/gdb/frame.c index e40685f..e643823 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -1020,9 +1020,8 @@ do_frame_register_read (void *src, int regnum, gdb_byte *buf) std::unique_ptr frame_save_as_regcache (struct frame_info *this_frame) { - const address_space *aspace = get_frame_address_space (this_frame); std::unique_ptr regcache - (new struct regcache (get_frame_arch (this_frame), aspace)); + (new struct regcache (get_frame_arch (this_frame))); regcache_save (regcache.get (), do_frame_register_read, this_frame); return regcache; -- cgit v1.1