aboutsummaryrefslogtreecommitdiff
path: root/gdb/frame.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/frame.c')
-rw-r--r--gdb/frame.c4
1 files changed, 2 insertions, 2 deletions
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);