mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-24 04:29:49 +00:00
2003-01-07 Andrew Cagney <cagney@redhat.com>
* arm-tdep.c (arm_init_extra_frame_info): Use deprecated_update_frame_base_hack. * xstormy16-tdep.c (xstormy16_scan_prologue): Ditto. * mn10300-tdep.c (analyze_dummy_frame): Ditto. (fix_frame_pointer): Ditto. (mn10300_analyze_prologue): Ditto.
This commit is contained in:
parent
a00a19e94c
commit
b0c6b05c0f
@ -1,3 +1,12 @@
|
||||
2003-01-07 Andrew Cagney <cagney@redhat.com>
|
||||
|
||||
* arm-tdep.c (arm_init_extra_frame_info): Use
|
||||
deprecated_update_frame_base_hack.
|
||||
* xstormy16-tdep.c (xstormy16_scan_prologue): Ditto.
|
||||
* mn10300-tdep.c (analyze_dummy_frame): Ditto.
|
||||
(fix_frame_pointer): Ditto.
|
||||
(mn10300_analyze_prologue): Ditto.
|
||||
|
||||
2003-01-07 Andrew Cagney <cagney@redhat.com>
|
||||
|
||||
* xstormy16-tdep.c (xstormy16_init_extra_frame_info): Allocate
|
||||
|
@ -1131,9 +1131,7 @@ arm_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
|
||||
/* FIXME: What about thumb mode? */
|
||||
fi->extra_info->framereg = ARM_SP_REGNUM;
|
||||
fi->frame =
|
||||
read_memory_integer (get_frame_saved_regs (fi)[fi->extra_info->framereg],
|
||||
REGISTER_RAW_SIZE (fi->extra_info->framereg));
|
||||
deprecated_update_frame_base_hack (fi, read_memory_integer (get_frame_saved_regs (fi)[fi->extra_info->framereg], REGISTER_RAW_SIZE (fi->extra_info->framereg)));
|
||||
fi->extra_info->framesize = 0;
|
||||
fi->extra_info->frameoffset = 0;
|
||||
|
||||
@ -1144,23 +1142,22 @@ arm_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
|
||||
if (!fi->next)
|
||||
/* This is the innermost frame? */
|
||||
fi->frame = read_register (fi->extra_info->framereg);
|
||||
deprecated_update_frame_base_hack (fi, read_register (fi->extra_info->framereg));
|
||||
else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi->next), 0, 0))
|
||||
/* Next inner most frame is a dummy, just grab its frame.
|
||||
Dummy frames always have the same FP as their caller. */
|
||||
fi->frame = fi->next->frame;
|
||||
deprecated_update_frame_base_hack (fi, fi->next->frame);
|
||||
else if (fi->extra_info->framereg == ARM_FP_REGNUM
|
||||
|| fi->extra_info->framereg == THUMB_FP_REGNUM)
|
||||
{
|
||||
/* not the innermost frame */
|
||||
/* If we have an FP, the callee saved it. */
|
||||
if (get_frame_saved_regs (get_next_frame (fi))[fi->extra_info->framereg] != 0)
|
||||
fi->frame =
|
||||
read_memory_integer (get_frame_saved_regs (get_next_frame (fi))[fi->extra_info->framereg], 4);
|
||||
deprecated_update_frame_base_hack (fi, read_memory_integer (get_frame_saved_regs (get_next_frame (fi))[fi->extra_info->framereg], 4));
|
||||
else if (fromleaf)
|
||||
/* If we were called by a frameless fn. then our frame is
|
||||
still in the frame pointer register on the board... */
|
||||
fi->frame = read_fp ();
|
||||
deprecated_update_frame_base_hack (fi, read_fp ());
|
||||
}
|
||||
|
||||
/* Calculate actual addresses of saved registers using offsets
|
||||
|
@ -1,3 +1,4 @@
|
||||
#define FRAME_C
|
||||
/* Cache and manage frames for GDB, the GNU debugger.
|
||||
|
||||
Copyright 1986, 1987, 1989, 1991, 1994, 1995, 1996, 1998, 2000,
|
||||
|
@ -162,7 +162,7 @@ analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame)
|
||||
dummy->next = NULL;
|
||||
dummy->prev = NULL;
|
||||
deprecated_update_frame_pc_hack (dummy, pc);
|
||||
dummy->frame = frame;
|
||||
deprecated_update_frame_base_hack (dummy, frame);
|
||||
dummy->extra_info->status = 0;
|
||||
dummy->extra_info->stack_size = 0;
|
||||
memset (get_frame_saved_regs (dummy), '\000', SIZEOF_FRAME_SAVED_REGS);
|
||||
@ -210,9 +210,9 @@ fix_frame_pointer (struct frame_info *fi, int stack_size)
|
||||
if (fi && fi->next == NULL)
|
||||
{
|
||||
if (fi->extra_info->status & MY_FRAME_IN_SP)
|
||||
fi->frame = read_sp () - stack_size;
|
||||
deprecated_update_frame_base_hack (fi, read_sp () - stack_size);
|
||||
else if (fi->extra_info->status & MY_FRAME_IN_FP)
|
||||
fi->frame = read_register (A3_REGNUM);
|
||||
deprecated_update_frame_base_hack (fi, read_register (A3_REGNUM));
|
||||
}
|
||||
}
|
||||
|
||||
@ -437,7 +437,7 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
if (fi && buf[0] == 0xf0 && buf[1] == 0xfc)
|
||||
{
|
||||
if (fi->next == NULL)
|
||||
fi->frame = read_sp ();
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
return get_frame_pc (fi);
|
||||
}
|
||||
|
||||
@ -446,7 +446,7 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
if (fi && get_frame_pc (fi) == func_addr)
|
||||
{
|
||||
if (fi->next == NULL)
|
||||
fi->frame = read_sp ();
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
return get_frame_pc (fi);
|
||||
}
|
||||
|
||||
@ -495,7 +495,7 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
{
|
||||
/* Fix fi->frame since it's bogus at this point. */
|
||||
if (fi && fi->next == NULL)
|
||||
fi->frame = read_sp ();
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
|
||||
/* Note if/where callee saved registers were saved. */
|
||||
set_movm_offsets (fi, movm_args);
|
||||
@ -508,7 +508,7 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
{
|
||||
/* Fix fi->frame since it's bogus at this point. */
|
||||
if (fi && fi->next == NULL)
|
||||
fi->frame = read_sp ();
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
|
||||
/* Note if/where callee saved registers were saved. */
|
||||
set_movm_offsets (fi, movm_args);
|
||||
|
@ -594,12 +594,12 @@ xstormy16_scan_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
|
||||
if (fi->extra_info->frameless_p)
|
||||
{
|
||||
get_frame_saved_regs (fi)[E_SP_REGNUM] = sp - fi->extra_info->framesize;
|
||||
fi->frame = sp;
|
||||
deprecated_update_frame_base_hack (fi, sp);
|
||||
}
|
||||
else
|
||||
{
|
||||
get_frame_saved_regs (fi)[E_SP_REGNUM] = fp - fi->extra_info->framesize;
|
||||
fi->frame = fp;
|
||||
deprecated_update_frame_base_hack (fi, fp);
|
||||
}
|
||||
|
||||
/* So far only offsets to the beginning of the frame are
|
||||
|
Loading…
Reference in New Issue
Block a user