Fri Sep 13 14:59:55 2002 Andrew Cagney <cagney@redhat.com>
* mips-tdep.c (read_next_frame_reg): Re-hack using frame_register_unwind.
This commit is contained in:
parent
78d0849c9d
commit
6415945597
|
@ -1,3 +1,8 @@
|
||||||
|
Fri Sep 13 14:59:55 2002 Andrew Cagney <cagney@redhat.com>
|
||||||
|
|
||||||
|
* mips-tdep.c (read_next_frame_reg): Re-hack using
|
||||||
|
frame_register_unwind.
|
||||||
|
|
||||||
Fri Sep 13 07:42:09 2002 Andrew Cagney <cagney@redhat.com>
|
Fri Sep 13 07:42:09 2002 Andrew Cagney <cagney@redhat.com>
|
||||||
|
|
||||||
* mips-tdep.c (mips_get_saved_register): Re-hack using
|
* mips-tdep.c (mips_get_saved_register): Re-hack using
|
||||||
|
|
|
@ -1589,21 +1589,29 @@ mips_frame_init_saved_regs (struct frame_info *frame)
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
read_next_frame_reg (struct frame_info *fi, int regno)
|
read_next_frame_reg (struct frame_info *fi, int regno)
|
||||||
{
|
{
|
||||||
for (; fi; fi = fi->next)
|
int optimized;
|
||||||
|
CORE_ADDR addr;
|
||||||
|
int realnum;
|
||||||
|
enum lval_type lval;
|
||||||
|
void *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
|
||||||
|
frame_register_unwind (fi, regno, &optimized, &lval, &addr, &realnum,
|
||||||
|
raw_buffer);
|
||||||
|
/* FIXME: cagney/2002-09-13: This is just soooo bad. The MIPS
|
||||||
|
should have a pseudo register range that correspons to the ABI's,
|
||||||
|
rather than the ISA's, view of registers. These registers would
|
||||||
|
then implicitly describe their size and hence could be used
|
||||||
|
without the below munging. */
|
||||||
|
if (lval == lval_memory)
|
||||||
{
|
{
|
||||||
/* We have to get the saved sp from the sigcontext
|
if (regno < 32)
|
||||||
if it is a signal handler frame. */
|
|
||||||
if (regno == SP_REGNUM && !fi->signal_handler_caller)
|
|
||||||
return fi->frame;
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
if (fi->saved_regs == NULL)
|
/* Only MIPS_SAVED_REGSIZE bytes of GP registers are
|
||||||
FRAME_INIT_SAVED_REGS (fi);
|
saved. */
|
||||||
if (fi->saved_regs[regno])
|
return read_memory_integer (addr, MIPS_SAVED_REGSIZE);
|
||||||
return read_memory_integer (ADDR_BITS_REMOVE (fi->saved_regs[regno]), MIPS_SAVED_REGSIZE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return read_signed_register (regno);
|
|
||||||
|
return extract_signed_integer (raw_buffer, REGISTER_VIRTUAL_SIZE (regno));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* mips_addr_bits_remove - remove useless address bits */
|
/* mips_addr_bits_remove - remove useless address bits */
|
||||||
|
|
Loading…
Reference in New Issue