2002-11-19 Andrew Cagney <ac131313@redhat.com>

* frame.h (FRAME_FP): Delete macro.
	(get_frame_base): New function declaration.
	* frame.c (get_frame_base): New function.
	(get_frame_id): Use ->frame.
	(frame_find_by_id): Rewrite to use get_frame_id.
	* blockframe.c: Use get_frame_base instead of FRAME_FP.
	* cris-tdep.c, d10v-tdep.c, findvar.c, h8500-tdep.c: Ditto.
	* hppa-tdep.c, i386-tdep.c, infcmd.c, infrun.c: Ditto.
	* m68hc11-tdep.c, m68k-tdep.c, mcore-tdep.c, mips-tdep.c: Ditto.
	* mn10200-tdep.c, mn10300-tdep.c, rs6000-tdep.c: Ditto.
	* sh-tdep.c, sparc-tdep.c, stack.c, tracepoint.c: Ditto.
	* v850-tdep.c, valops.c, z8k-tdep.c: Ditto.
This commit is contained in:
Andrew Cagney
2002-11-24 19:48:13 +00:00
parent e5d2af146b
commit c193f6ac9c
25 changed files with 128 additions and 73 deletions

View File

@@ -681,29 +681,29 @@ cris_examine (CORE_ADDR ip, CORE_ADDR limit, struct frame_info *fi,
if (have_fp)
{
fi->saved_regs[FP_REGNUM] = FRAME_FP (fi);
fi->saved_regs[FP_REGNUM] = get_frame_base (fi);
/* Calculate the addresses. */
for (regno = regsave; regno >= 0; regno--)
{
fi->saved_regs[regno] = FRAME_FP (fi) - val;
fi->saved_regs[regno] = get_frame_base (fi) - val;
val -= 4;
}
if (fi->extra_info->leaf_function)
{
/* Set the register SP to contain the stack pointer of
the caller. */
fi->saved_regs[SP_REGNUM] = FRAME_FP (fi) + 4;
fi->saved_regs[SP_REGNUM] = get_frame_base (fi) + 4;
}
else
{
/* Set the register SP to contain the stack pointer of
the caller. */
fi->saved_regs[SP_REGNUM] = FRAME_FP (fi) + 8;
fi->saved_regs[SP_REGNUM] = get_frame_base (fi) + 8;
/* Set the register SRP to contain the return address of
the caller. */
fi->saved_regs[SRP_REGNUM] = FRAME_FP (fi) + 4;
fi->saved_regs[SRP_REGNUM] = get_frame_base (fi) + 4;
}
}
return ip;
@@ -1260,7 +1260,7 @@ cris_frame_chain (struct frame_info *fi)
}
else if (!inside_entry_file (fi->pc))
{
return read_memory_unsigned_integer (FRAME_FP (fi), 4);
return read_memory_unsigned_integer (get_frame_base (fi), 4);
}
else
{