aboutsummaryrefslogtreecommitdiff
path: root/gdb/mn10300-tdep.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-11-23 02:48:40 +0000
committerAndrew Cagney <cagney@redhat.com>2003-11-23 02:48:40 +0000
commit213cc0adce5744bfcc60c72833efa76338580f8c (patch)
tree215335f471fbd826ebea805b08bfb13a93ffd023 /gdb/mn10300-tdep.c
parent436d9e46434ecc4ee860265c8f7f8c11bcb9904f (diff)
downloadgdb-213cc0adce5744bfcc60c72833efa76338580f8c.zip
gdb-213cc0adce5744bfcc60c72833efa76338580f8c.tar.gz
gdb-213cc0adce5744bfcc60c72833efa76338580f8c.tar.bz2
2003-11-22 Andrew Cagney <cagney@redhat.com>
* 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.
Diffstat (limited to 'gdb/mn10300-tdep.c')
-rw-r--r--gdb/mn10300-tdep.c17
1 files changed, 5 insertions, 12 deletions
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;
}