From 791199cc75fd294a4f5a228f83abdcbfb4c64c7e Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 23 Sep 2017 14:39:56 -0600 Subject: Remove regcache_xmalloc This patch removes regcache_xmalloc in favor of plain "new". gdb/ChangeLog 2017-09-25 Tom Tromey * regcache.h (regcache_xmalloc): Don't declare. (regcache_raw_set_cached_value): Update comment. * regcache.c (regcache_xmalloc): Remove. * ppc-linux-tdep.c (ppu2spu_sniffer): Use new. * jit.c (jit_frame_sniffer): Use new. * frame.c (frame_save_as_regcache): Use new. --- gdb/frame.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/frame.c') diff --git a/gdb/frame.c b/gdb/frame.c index f100da3..ad0cb92 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -1021,8 +1021,8 @@ struct regcache * frame_save_as_regcache (struct frame_info *this_frame) { struct address_space *aspace = get_frame_address_space (this_frame); - struct regcache *regcache = regcache_xmalloc (get_frame_arch (this_frame), - aspace); + struct regcache *regcache = new regcache (get_frame_arch (this_frame), + aspace); struct cleanup *cleanups = make_cleanup_regcache_xfree (regcache); regcache_save (regcache, do_frame_register_read, this_frame); -- cgit v1.1