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.
This commit is contained in:
parent
436d9e4643
commit
213cc0adce
6 changed files with 27 additions and 70 deletions
|
@ -1,5 +1,19 @@
|
|||
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.
|
||||
|
||||
* mips-tdep.c (mips_frame_chain): Delete call to
|
||||
deprecated_inside_entry_file.
|
||||
|
||||
|
|
27
gdb/frame.c
27
gdb/frame.c
|
@ -2223,34 +2223,13 @@ deprecated_update_frame_base_hack (struct frame_info *frame, CORE_ADDR base)
|
|||
frame->this_id.value.stack_addr = base;
|
||||
}
|
||||
|
||||
void
|
||||
deprecated_set_frame_saved_regs_hack (struct frame_info *frame,
|
||||
CORE_ADDR *saved_regs)
|
||||
{
|
||||
frame->saved_regs = saved_regs;
|
||||
}
|
||||
|
||||
void
|
||||
deprecated_set_frame_extra_info_hack (struct frame_info *frame,
|
||||
struct frame_extra_info *extra_info)
|
||||
{
|
||||
frame->extra_info = extra_info;
|
||||
}
|
||||
|
||||
struct frame_info *
|
||||
deprecated_frame_xmalloc (void)
|
||||
{
|
||||
struct frame_info *frame = XMALLOC (struct frame_info);
|
||||
memset (frame, 0, sizeof (*frame));
|
||||
frame->this_id.p = 1;
|
||||
return frame;
|
||||
}
|
||||
|
||||
struct frame_info *
|
||||
deprecated_frame_xmalloc_with_cleanup (long sizeof_saved_regs,
|
||||
long sizeof_extra_info)
|
||||
{
|
||||
struct frame_info *frame = deprecated_frame_xmalloc ();
|
||||
struct frame_info *frame = XMALLOC (struct frame_info);
|
||||
memset (frame, 0, sizeof (*frame));
|
||||
frame->this_id.p = 1;
|
||||
make_cleanup (xfree, frame);
|
||||
if (sizeof_saved_regs > 0)
|
||||
{
|
||||
|
|
19
gdb/frame.h
19
gdb/frame.h
|
@ -702,25 +702,6 @@ extern void deprecated_update_frame_pc_hack (struct frame_info *frame,
|
|||
extern void deprecated_update_frame_base_hack (struct frame_info *frame,
|
||||
CORE_ADDR base);
|
||||
|
||||
/* FIXME: cagney/2003-01-04: Explicitly set the frame's saved_regs
|
||||
and/or extra_info. Target code is allocating a fake frame and than
|
||||
initializing that to get around the problem of, when creating the
|
||||
inner most frame, there is no where to cache information such as
|
||||
the prologue analysis. This is fixed by the new unwind mechanism -
|
||||
even the inner most frame has somewhere to store things like the
|
||||
prolog analysis (or at least will once the frame overhaul is
|
||||
finished). */
|
||||
extern void deprecated_set_frame_saved_regs_hack (struct frame_info *frame,
|
||||
CORE_ADDR *saved_regs);
|
||||
extern void deprecated_set_frame_extra_info_hack (struct frame_info *frame,
|
||||
struct frame_extra_info *extra_info);
|
||||
|
||||
/* FIXME: cagney/2003-01-04: Allocate a frame from the heap (rather
|
||||
than the frame obstack). Targets do this as a way of saving the
|
||||
prologue analysis from the inner most frame before that frame has
|
||||
been created. By always creating a frame, this problem goes away. */
|
||||
extern struct frame_info *deprecated_frame_xmalloc (void);
|
||||
|
||||
/* FIXME: cagney/2003-01-05: Allocate a frame, along with the
|
||||
saved_regs and extra_info. Set up cleanups for all three. Same as
|
||||
for deprecated_frame_xmalloc, targets are calling this when
|
||||
|
|
|
@ -246,25 +246,16 @@ mcore_reg_struct_has_addr (int gcc_p, struct type *type)
|
|||
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 = (CORE_ADDR *) 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)->framesize = 0;
|
||||
memset (deprecated_get_frame_saved_regs (dummy), '\000', SIZEOF_FRAME_SAVED_REGS);
|
||||
mcore_analyze_prologue (dummy, 0, 0);
|
||||
do_cleanups (old_chain);
|
||||
return dummy;
|
||||
}
|
||||
|
||||
|
|
|
@ -2575,7 +2575,6 @@ mips_init_extra_frame_info (int fromleaf, struct frame_info *fci)
|
|||
|
||||
frame_extra_info_zalloc (fci, sizeof (struct frame_extra_info));
|
||||
|
||||
deprecated_set_frame_saved_regs_hack (fci, NULL);
|
||||
get_frame_extra_info (fci)->proc_desc =
|
||||
proc_desc == &temp_proc_desc ? 0 : proc_desc;
|
||||
if (proc_desc)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue