summaryrefslogtreecommitdiff
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
commit71b8f2d9552ed18732d8132a3f75b8c05f58baaa (patch)
tree3f9782684ad982a12688452dbbbdf73bec832648 /gdb/mn10300-tdep.c
parentb4cc249911113dc497e1df224977eab4af8b6cf4 (diff)
downloadgdb-71b8f2d9552ed18732d8132a3f75b8c05f58baaa.tar.gz
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 9f62e8acac9..fdc353031f6 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;
}