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/jit.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gdb/jit.c') diff --git a/gdb/jit.c b/gdb/jit.c index b70f87c..7538684 100644 --- a/gdb/jit.c +++ b/gdb/jit.c @@ -1199,13 +1199,11 @@ jit_frame_sniffer (const struct frame_unwind *self, gdb_assert (!*cache); - const address_space *aspace = get_frame_address_space (this_frame); - gdbarch = get_frame_arch (this_frame); *cache = XCNEW (struct jit_unwind_private); priv_data = (struct jit_unwind_private *) *cache; - priv_data->regcache = new regcache (gdbarch, aspace); + priv_data->regcache = new regcache (gdbarch); priv_data->this_frame = this_frame; callbacks.priv_data = priv_data; -- cgit v1.1