From 9ac86b52da268147b2565e4920357432bb7a34c3 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 23 Sep 2017 15:34:30 -0600 Subject: Remove make_cleanup_regcache_xfree This removes make_cleanup_regcache_xfree in favor of using std::unique_ptr as the return type of frame_save_as_regcache. gdb/ChangeLog 2017-09-25 Tom Tromey * spu-tdep.c (spu2ppu_sniffer): Update. * regcache.h (make_cleanup_regcache_xfree): Don't declare. * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree): Remove. * ppc-linux-tdep.c (ppu2spu_sniffer): Update. * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update. * frame.h (frame_save_as_regcache): Return std::unique_ptr. * frame.c (frame_save_as_regcache): Return std::unique_ptr. (frame_pop): Update. --- gdb/frame.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gdb/frame.h') diff --git a/gdb/frame.h b/gdb/frame.h index 3b00d36..0249857 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -679,7 +679,8 @@ extern void *frame_obstack_zalloc (unsigned long size); ((TYPE *) frame_obstack_zalloc ((NUMBER) * sizeof (TYPE))) /* Create a regcache, and copy the frame's registers into it. */ -struct regcache *frame_save_as_regcache (struct frame_info *this_frame); +std::unique_ptr frame_save_as_regcache + (struct frame_info *this_frame); extern const struct block *get_frame_block (struct frame_info *, CORE_ADDR *addr_in_block); -- cgit v1.1