From 213cc0adce5744bfcc60c72833efa76338580f8c Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Sun, 23 Nov 2003 02:48:40 +0000 Subject: 2003-11-22 Andrew Cagney * frame.c (deprecated_frame_xmalloc): Delete function. (deprecated_set_frame_extra_info_hack): Delete function. (deprecated_set_frame_saved_regs_hack): Delete function. * frame.h (deprecated_frame_xmalloc): Delete declaration. (deprecated_set_frame_extra_info_hack): Delete declaration. (deprecated_set_frame_saved_regs_hack): Delete declaration. * mcore-tdep.c (analyze_dummy_frame): Instead of deprecated_frame_xmalloc, deprecated_set_frame_saved_regs_hack, and deprecated_set_frame_extra_info_hack use deprecated_frame_xmalloc_with_cleanup. * mn10300-tdep.c (analyze_dummy_frame): Ditto. * mips-tdep.c (mips_init_extra_frame_info): Delete call to deprecated_set_frame_saved_regs_hack. --- gdb/mn10300-tdep.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'gdb/mn10300-tdep.c') diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index 9f62e8a..fdc3530 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -152,23 +152,16 @@ static struct frame_info *analyze_dummy_frame (CORE_ADDR, CORE_ADDR); static struct frame_info * analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame) { - static struct frame_info *dummy = NULL; - if (dummy == NULL) - { - struct frame_extra_info *extra_info; - CORE_ADDR *saved_regs; - dummy = deprecated_frame_xmalloc (); - saved_regs = xmalloc (SIZEOF_FRAME_SAVED_REGS); - deprecated_set_frame_saved_regs_hack (dummy, saved_regs); - extra_info = XMALLOC (struct frame_extra_info); - deprecated_set_frame_extra_info_hack (dummy, extra_info); - } + struct cleanup *old_chain = make_cleanup (null_cleanup, NULL); + struct frame_info *dummy + = deprecated_frame_xmalloc_with_cleanup (SIZEOF_FRAME_SAVED_REGS, + sizeof (struct frame_extra_info)); deprecated_update_frame_pc_hack (dummy, pc); deprecated_update_frame_base_hack (dummy, frame); get_frame_extra_info (dummy)->status = 0; get_frame_extra_info (dummy)->stack_size = 0; - memset (deprecated_get_frame_saved_regs (dummy), '\000', SIZEOF_FRAME_SAVED_REGS); mn10300_analyze_prologue (dummy, pc); + do_cleanups (old_chain); return dummy; } -- cgit v1.1