aboutsummaryrefslogtreecommitdiff
path: root/gdb/v850-tdep.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-01-08 01:53:38 +0000
committerAndrew Cagney <cagney@redhat.com>2003-01-08 01:53:38 +0000
commit1e2330ba1fbf486c2851272e2aa09dd57ad367e6 (patch)
tree9a92bb6aff20e7c56c6efce933de70fd249841e1 /gdb/v850-tdep.c
parenta3982d4858ac407c7e879a57762bc4130d54d4b8 (diff)
downloadgdb-1e2330ba1fbf486c2851272e2aa09dd57ad367e6.zip
gdb-1e2330ba1fbf486c2851272e2aa09dd57ad367e6.tar.gz
gdb-1e2330ba1fbf486c2851272e2aa09dd57ad367e6.tar.bz2
2003-01-07 Andrew Cagney <cagney@redhat.com>
* alpha-tdep.c: Use get_frame_base. * 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, mn10200-tdep.c: Ditto. * mn10300-tdep.c, ns32k-tdep.c, s390-tdep.c, sh-tdep.c: Ditto. * sparc-tdep.c, v850-tdep.c, vax-tdep.c: Ditto. * x86-64-linux-tdep.c, xstormy16-tdep.c: Ditto. * config/h8500/tm-h8500.h, config/mn10200/tm-mn10200.h: Ditto. * config/sparc/tm-sparc.h: Ditto.
Diffstat (limited to 'gdb/v850-tdep.c')
-rw-r--r--gdb/v850-tdep.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 1a28b74..07b4c0f 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -801,8 +801,10 @@ CORE_ADDR
v850_find_callers_reg (struct frame_info *fi, int regnum)
{
for (; fi; fi = fi->next)
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame))
- return deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, regnum);
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
+ get_frame_base (fi)))
+ return deprecated_read_register_dummy (get_frame_pc (fi),
+ get_frame_base (fi), regnum);
else if (get_frame_saved_regs (fi)[regnum] != 0)
return read_memory_unsigned_integer (get_frame_saved_regs (fi)[regnum],
v850_register_raw_size (regnum));
@@ -842,7 +844,7 @@ v850_frame_chain (struct frame_info *fi)
if (pi.framereg == E_FP_RAW_REGNUM)
return v850_find_callers_reg (fi, pi.framereg);
- return fi->frame - pi.frameoffset;
+ return get_frame_base (fi) - pi.frameoffset;
}
/* Function: skip_prologue
@@ -884,7 +886,9 @@ v850_pop_frame (void)
struct frame_info *frame = get_current_frame ();
int regnum;
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
+ get_frame_base (frame),
+ get_frame_base (frame)))
generic_pop_dummy_frame ();
else
{
@@ -1010,8 +1014,10 @@ v850_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
CORE_ADDR
v850_frame_saved_pc (struct frame_info *fi)
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame))
- return deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, E_PC_REGNUM);
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
+ get_frame_base (fi)))
+ return deprecated_read_register_dummy (get_frame_pc (fi),
+ get_frame_base (fi), E_PC_REGNUM);
else
return v850_find_callers_reg (fi, E_RP_REGNUM);
}
@@ -1112,7 +1118,8 @@ v850_frame_init_saved_regs (struct frame_info *fi)
/* The call dummy doesn't save any registers on the stack, so we
can return now. */
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
+ get_frame_base (fi)))
return;
/* Find the beginning of this function, so we can analyze its
@@ -1128,7 +1135,7 @@ v850_frame_init_saved_regs (struct frame_info *fi)
for (pifsr = pifsrs; pifsr->framereg; pifsr++)
{
- get_frame_saved_regs (fi)[pifsr->reg] = pifsr->offset + fi->frame;
+ get_frame_saved_regs (fi)[pifsr->reg] = pifsr->offset + get_frame_base (fi);
if (pifsr->framereg == E_SP_REGNUM)
get_frame_saved_regs (fi)[pifsr->reg] += pi.frameoffset;