aboutsummaryrefslogtreecommitdiff
path: root/gdb/cris-tdep.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-01-03 23:53:48 +0000
committerAndrew Cagney <cagney@redhat.com>2003-01-03 23:53:48 +0000
commitb2fb46766e90d9753db4f8db3138f69be34f8e3b (patch)
treef74501ef789c4c6995604eb66fc4de8e90620870 /gdb/cris-tdep.c
parent8dcde88743b22fab1f0d9c16b39ef4a892d88c36 (diff)
downloadgdb-b2fb46766e90d9753db4f8db3138f69be34f8e3b.zip
gdb-b2fb46766e90d9753db4f8db3138f69be34f8e3b.tar.gz
gdb-b2fb46766e90d9753db4f8db3138f69be34f8e3b.tar.bz2
2003-01-03 Andrew Cagney <ac131313@redhat.com>
* alpha-tdep.c: Use get_frame_saved_regs. * arm-tdep.c, avr-tdep.c, cris-tdep.c, d10v-tdep.c: Ditto. * h8300-tdep.c, i386-tdep.c, ia64-tdep.c, m68hc11-tdep.c: Ditto. * m68k-tdep.c, mcore-tdep.c, mips-tdep.c, mn10300-tdep.c: Ditto. * ns32k-tdep.c, s390-tdep.c, sh-tdep.c, v850-tdep.c: Ditto. * vax-tdep.c, xstormy16-tdep.c: Ditto.
Diffstat (limited to 'gdb/cris-tdep.c')
-rw-r--r--gdb/cris-tdep.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 52f20bb..5301355 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -501,10 +501,10 @@ cris_examine (CORE_ADDR ip, CORE_ADDR limit, struct frame_info *fi,
/* We only want to know the end of the prologue when fi->saved_regs == 0.
When the saved registers are allocated full information is required. */
- if (fi->saved_regs)
+ if (get_frame_saved_regs (fi))
{
for (regno = 0; regno < NUM_REGS; regno++)
- fi->saved_regs[regno] = 0;
+ get_frame_saved_regs (fi)[regno] = 0;
}
/* Find the prologue instructions. */
@@ -676,34 +676,34 @@ cris_examine (CORE_ADDR ip, CORE_ADDR limit, struct frame_info *fi,
/* We only want to know the end of the prologue when
fi->saved_regs == 0. */
- if (!fi->saved_regs)
+ if (!get_frame_saved_regs (fi))
return ip;
if (have_fp)
{
- fi->saved_regs[FP_REGNUM] = get_frame_base (fi);
+ get_frame_saved_regs (fi)[FP_REGNUM] = get_frame_base (fi);
/* Calculate the addresses. */
for (regno = regsave; regno >= 0; regno--)
{
- fi->saved_regs[regno] = get_frame_base (fi) - val;
+ get_frame_saved_regs (fi)[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] = get_frame_base (fi) + 4;
+ get_frame_saved_regs (fi)[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] = get_frame_base (fi) + 8;
+ get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi) + 8;
/* Set the register SRP to contain the return address of
the caller. */
- fi->saved_regs[SRP_REGNUM] = get_frame_base (fi) + 4;
+ get_frame_saved_regs (fi)[SRP_REGNUM] = get_frame_base (fi) + 4;
}
}
return ip;
@@ -743,7 +743,7 @@ cris_skip_prologue_main (CORE_ADDR pc, int frameless_p)
/* frame_info now contains dynamic memory. Since fi is a dummy here,
I use static memory for extra_info, and don't bother allocating
memory for saved_regs. */
- fi.saved_regs = 0;
+ memset (&fi, 0, sizeof (fi));
fi.extra_info = &fei;
/* If there is no symbol information then sal.end == 0, and we end up
@@ -1164,7 +1164,7 @@ cris_frame_init_saved_regs (struct frame_info *fi)
register int frameless_p = 0;
/* Has this frame's registers already been initialized? */
- if (fi->saved_regs)
+ if (get_frame_saved_regs (fi))
return;
frame_saved_regs_zalloc (fi);
@@ -1231,11 +1231,11 @@ cris_init_extra_frame_info (int fromleaf, struct frame_info *fi)
/* Check fromleaf/frameless_function_invocation. (FIXME) */
- if (fi->saved_regs[SRP_REGNUM] != 0)
+ if (get_frame_saved_regs (fi)[SRP_REGNUM] != 0)
{
/* SRP was saved on the stack; non-leaf function. */
fi->extra_info->return_pc =
- read_memory_integer (fi->saved_regs[SRP_REGNUM],
+ read_memory_integer (get_frame_saved_regs (fi)[SRP_REGNUM],
REGISTER_RAW_SIZE (SRP_REGNUM));
}
else
@@ -1533,30 +1533,30 @@ cris_pop_frame (void)
after SP was saved. */
for (regno = 0; regno < FP_REGNUM; regno++)
{
- if (fi->saved_regs[regno])
+ if (get_frame_saved_regs (fi)[regno])
{
write_register (regno,
- read_memory_integer (fi->saved_regs[regno], 4));
+ read_memory_integer (get_frame_saved_regs (fi)[regno], 4));
}
}
- if (fi->saved_regs[FP_REGNUM])
+ if (get_frame_saved_regs (fi)[FP_REGNUM])
{
/* Pop the frame pointer (R8). It was pushed before SP
was saved. */
write_register (FP_REGNUM,
- read_memory_integer (fi->saved_regs[FP_REGNUM], 4));
+ read_memory_integer (get_frame_saved_regs (fi)[FP_REGNUM], 4));
stack_offset += 4;
/* Not a leaf function. */
- if (fi->saved_regs[SRP_REGNUM])
+ if (get_frame_saved_regs (fi)[SRP_REGNUM])
{
/* SRP was pushed before SP was saved. */
stack_offset += 4;
}
/* Restore the SP and adjust for R8 and (possibly) SRP. */
- write_register (SP_REGNUM, fi->saved_regs[FP_REGNUM] + stack_offset);
+ write_register (SP_REGNUM, get_frame_saved_regs (fi)[FP_REGNUM] + stack_offset);
}
else
{