* alpha-tdep.c: Use deprecated_update_frame_base_hack.
* avr-tdep.c, cris-tdep.c: Ditto.
* mcore-tdep.c, mips-tdep.c, mn10200-tdep.c: Ditto.
* sh-tdep.c, sparc-tdep.c, v850-tdep.c: Ditto.
+2003-01-03 Andrew Cagney <cagney@redhat.com>
+
+ * alpha-tdep.c: Use deprecated_update_frame_base_hack.
+ * avr-tdep.c, cris-tdep.c: Ditto.
+ * mcore-tdep.c, mips-tdep.c, mn10200-tdep.c: Ditto.
+ * sh-tdep.c, sparc-tdep.c, v850-tdep.c: Ditto.
+
2003-01-03 Mark Kettenis <kettenis@gnu.org>
* configure.in: Remove --enable-netrom option.
/* Fetch the frame pointer for a dummy frame from the procedure
descriptor. */
if (PROC_DESC_IS_DUMMY (proc_desc))
- frame->frame = (CORE_ADDR) PROC_DUMMY_FRAME (proc_desc);
+ deprecated_update_frame_base_hack (frame, (CORE_ADDR) PROC_DUMMY_FRAME (proc_desc));
/* This may not be quite right, if proc has a real frame register.
Get the value of the frame relative sp, procedure might have been
interrupted by a signal at it's very start. */
else if (get_frame_pc (frame) == PROC_LOW_ADDR (proc_desc)
&& !alpha_proc_desc_is_dyn_sigtramp (proc_desc))
- frame->frame = read_next_frame_reg (frame->next, SP_REGNUM);
+ deprecated_update_frame_base_hack (frame, read_next_frame_reg (frame->next, SP_REGNUM));
else
- frame->frame = read_next_frame_reg (frame->next, PROC_FRAME_REG (proc_desc))
- + PROC_FRAME_OFFSET (proc_desc);
+ deprecated_update_frame_base_hack (frame, read_next_frame_reg (frame->next, PROC_FRAME_REG (proc_desc))
+ + PROC_FRAME_OFFSET (proc_desc));
if (proc_desc == &temp_proc_desc)
{
locals |= ((insn & 0xf) | ((insn & 0x0f00) >> 4)) << 8;
if (memcmp (prologue + vpc + 4, img, sizeof (img)) == 0)
{
- fi->frame = locals;
+ deprecated_update_frame_base_hack (fi, locals);
fi->extra_info->is_main = 1;
return;
{
/* We need to setup fi->frame here because run_stack_dummy gets it wrong
by assuming it's always FP. */
- fi->frame = deprecated_read_register_dummy (get_frame_pc (fi), fi->frame,
- AVR_PC_REGNUM);
+ deprecated_update_frame_base_hack (fi, deprecated_read_register_dummy (get_frame_pc (fi), fi->frame,
+ AVR_PC_REGNUM));
}
else 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 (fi->extra_info->is_main != 1) /* not the innermost frame, not `main' */
/* If we have an next frame, the callee saved it. */
{
struct frame_info *next_fi = fi->next;
if (fi->extra_info->framereg == AVR_SP_REGNUM)
- fi->frame =
- next_fi->frame + 2 /* ret addr */ + next_fi->extra_info->framesize;
+ deprecated_update_frame_base_hack (fi, next_fi->frame + 2 /* ret addr */ + next_fi->extra_info->framesize);
/* FIXME: I don't analyse va_args functions */
else
{
fp_high =
(fp1 ? read_memory_unsigned_integer (avr_make_saddr (fp1), 1) :
read_register (AVR_FP_REGNUM + 1)) & 0xff;
- fi->frame = fp_low | (fp_high << 8);
+ deprecated_update_frame_base_hack (fi, fp_low | (fp_high << 8));
}
}
{
/* We need to setup fi->frame here because run_stack_dummy gets it wrong
by assuming it's always FP. */
- fi->frame = deprecated_read_register_dummy (get_frame_pc (fi), fi->frame,
- SP_REGNUM);
+ deprecated_update_frame_base_hack (fi, deprecated_read_register_dummy (get_frame_pc (fi), fi->frame,
+ SP_REGNUM));
fi->extra_info->return_pc =
deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, PC_REGNUM);
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->framesize = 0;
memset (dummy->saved_regs, '\000', SIZEOF_FRAME_SAVED_REGS);
{
mcore_insn_debug (("MCORE: got jmp r15"));
if (fi->next == NULL)
- fi->frame = read_sp ();
+ deprecated_update_frame_base_hack (fi, read_sp ());
return get_frame_pc (fi);
}
if (fi != NULL && 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);
}
if (fi->next == NULL)
{
if (fi->extra_info->status & MY_FRAME_IN_SP)
- fi->frame = read_sp () + framesize;
+ deprecated_update_frame_base_hack (fi, read_sp () + framesize);
else
- fi->frame = read_register (fp_regnum) + framesize;
+ deprecated_update_frame_base_hack (fi, read_register (fp_regnum) + framesize);
}
/* Note where saved registers are stored. The offsets in REGISTER_OFFSETS
{
/* We need to setup fi->frame here because run_stack_dummy gets it wrong
by assuming it's always FP. */
- fi->frame = deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, SP_REGNUM);
+ deprecated_update_frame_base_hack (fi, deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, SP_REGNUM));
}
else
mcore_analyze_prologue (fi, 0, 0);
interrupted by a signal at it's very start. */
if (get_frame_pc (fci) == PROC_LOW_ADDR (proc_desc)
&& !PROC_DESC_IS_DUMMY (proc_desc))
- fci->frame = read_next_frame_reg (fci->next, SP_REGNUM);
+ deprecated_update_frame_base_hack (fci, read_next_frame_reg (fci->next, SP_REGNUM));
else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fci), 0, 0))
/* Do not ``fix'' fci->frame. It will have the value of the
generic dummy frame's top-of-stack (since the draft
part of the dummy frames data. */
/* Do nothing. */;
else
- fci->frame = get_frame_pointer (fci->next, proc_desc);
+ deprecated_update_frame_base_hack (fci, get_frame_pointer (fci->next, proc_desc));
if (proc_desc == &temp_proc_desc)
{
if (status != 0)
{
if (fi->next == NULL)
- fi->frame = read_sp ();
+ deprecated_update_frame_base_hack (fi, read_sp ());
return get_frame_pc (fi);
}
if (buf[0] == 0xfe)
{
if (fi->next == NULL)
- fi->frame = read_sp ();
+ deprecated_update_frame_base_hack (fi, read_sp ());
return get_frame_pc (fi);
}
}
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);
}
if (status != 0)
{
if (fi && fi->next == NULL && fi->status & MY_FRAME_IN_SP)
- fi->frame = read_sp ();
+ deprecated_update_frame_base_hack (fi, read_sp ());
return addr;
}
/* We still haven't allocated our local stack. Handle this
as if we stopped on the first or last insn of a function. */
if (fi && fi->next == NULL)
- fi->frame = read_sp ();
+ deprecated_update_frame_base_hack (fi, read_sp ());
return addr;
}
if (status != 0)
{
if (fi && fi->next == NULL)
- fi->frame = read_sp ();
+ deprecated_update_frame_base_hack (fi, read_sp ());
return addr;
}
if (buf[0] == 0xf2 && buf[1] == 0x7e)
else
{
if (fi && fi->next == NULL)
- fi->frame = read_sp ();
+ deprecated_update_frame_base_hack (fi, read_sp ());
return addr;
}
}
if (status != 0)
{
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
- fi->frame = read_sp ();
+ deprecated_update_frame_base_hack (fi, read_sp ());
return addr;
}
if (buf[0] == 0xd3)
if (addr >= stop)
{
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
- fi->frame = read_sp () - stack_size;
+ deprecated_update_frame_base_hack (fi, read_sp () - stack_size);
return addr;
}
}
if (status != 0)
{
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
- fi->frame = read_sp ();
+ deprecated_update_frame_base_hack (fi, read_sp ());
return addr;
}
stack_size = extract_signed_integer (buf, 2);
if (addr >= stop)
{
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
- fi->frame = read_sp () - stack_size;
+ deprecated_update_frame_base_hack (fi, read_sp () - stack_size);
return addr;
}
}
if (status != 0)
{
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
- fi->frame = read_sp ();
+ deprecated_update_frame_base_hack (fi, read_sp ());
return addr;
}
stack_size = extract_signed_integer (buf, 3);
if (addr >= stop)
{
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
- fi->frame = read_sp () - stack_size;
+ deprecated_update_frame_base_hack (fi, read_sp () - stack_size);
return addr;
}
}
if (status != 0)
{
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
- fi->frame = read_sp ();
+ deprecated_update_frame_base_hack (fi, read_sp ());
return addr;
}
if (status == 0)
{
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
- fi->frame = read_sp ();
+ deprecated_update_frame_base_hack (fi, read_sp ());
return addr;
}
if (fi && fi->next == NULL)
{
fi->stack_size -= 16;
- fi->frame = read_sp () - fi->stack_size;
+ deprecated_update_frame_base_hack (fi, read_sp () - fi->stack_size);
}
return addr;
}
if (status != 0)
{
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
- fi->frame = read_sp ();
+ deprecated_update_frame_base_hack (fi, read_sp ());
return addr;
}
if (status == 0)
{
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
- fi->frame = read_sp ();
+ deprecated_update_frame_base_hack (fi, read_sp ());
return addr;
}
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
{
fi->stack_size -= 16;
- fi->frame = read_sp () - fi->stack_size;
+ deprecated_update_frame_base_hack (fi, read_sp () - fi->stack_size);
}
return addr;
}
/* Update fi->frame if necessary. */
if (fi && fi->next == NULL)
- fi->frame = read_sp () - fi->stack_size;
+ deprecated_update_frame_base_hack (fi, read_sp () - fi->stack_size);
/* After the out of line prologue, there may be another
stack adjustment for the outgoing arguments.
/* Now that we know the size of the outgoing arguments, fix
fi->frame again if this is the innermost frame. */
if (fi && fi->next == NULL)
- fi->frame -= outgoing_args_size;
+ deprecated_update_frame_base_hack (fi, fi->frame - outgoing_args_size);
/* Note the register save information and update the stack
size for this frame too. */
need to fix fi->frame so that backtracing, find_frame_saved_regs,
etc work correctly. */
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP) != 0)
- fi->frame = read_sp () - fi->stack_size;
+ deprecated_update_frame_base_hack (fi, read_sp () - fi->stack_size);
/* And last we have the register saves. These are relatively
simple because they're physically done off the stack pointer,
So we set up a dummy frame and call mn10200_analyze_prologue to
find stuff for us. */
deprecated_update_frame_pc_hack (&dummy_frame, FRAME_SAVED_PC (fi));
- dummy_frame.frame = fi->frame;
+ deprecated_update_frame_base_hack (&dummy_frame, fi->frame);
memset (dummy_frame.fsr.regs, '\000', sizeof dummy_frame.fsr.regs);
dummy_frame.status = 0;
dummy_frame.stack_size = 0;
{
/* We need to setup fi->frame here because run_stack_dummy gets it wrong
by assuming it's always FP. */
- fi->frame = deprecated_read_register_dummy (get_frame_pc (fi), fi->frame,
- SP_REGNUM);
+ deprecated_update_frame_base_hack (fi, deprecated_read_register_dummy (get_frame_pc (fi), fi->frame,
+ SP_REGNUM));
fi->extra_info->return_pc = deprecated_read_register_dummy (get_frame_pc (fi),
fi->frame,
PC_REGNUM);
{
/* We need to setup fi->frame here because run_stack_dummy gets it wrong
by assuming it's always FP. */
- fi->frame = deprecated_read_register_dummy (get_frame_pc (fi), fi->frame,
- SP_REGNUM);
+ deprecated_update_frame_base_hack (fi, deprecated_read_register_dummy (get_frame_pc (fi), fi->frame,
+ SP_REGNUM));
fi->extra_info->return_pc =
deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, PC_REGNUM);
fi->extra_info->f_offset = -(CALL_DUMMY_LENGTH + 4);
{
/* A frameless function interrupted by a signal did not change
the frame pointer, fix up frame pointer accordingly. */
- fi->frame = get_frame_base (fi->next);
+ deprecated_update_frame_base_hack (fi, get_frame_base (fi->next));
fi->extra_info->bottom = fi->next->extra_info->bottom;
}
else
{
/* Should we adjust for stack bias here? */
get_saved_register (buf, 0, 0, fi, FP_REGNUM, 0);
- fi->frame = extract_address (buf, REGISTER_RAW_SIZE (FP_REGNUM));
+ deprecated_update_frame_base_hack (fi, extract_address (buf, REGISTER_RAW_SIZE (FP_REGNUM)));
if (GDB_TARGET_IS_SPARC64 && (fi->frame & 1))
- fi->frame += 2047;
+ deprecated_update_frame_base_hack (fi, fi->frame + 2047);
}
}
/* Overwrite the frame's address with the value in %i7. */
get_saved_register (buf, 0, 0, fi, I7_REGNUM, 0);
- fi->frame = extract_address (buf, REGISTER_RAW_SIZE (I7_REGNUM));
+ deprecated_update_frame_base_hack (fi, extract_address (buf, REGISTER_RAW_SIZE (I7_REGNUM)));
if (GDB_TARGET_IS_SPARC64 && (fi->frame & 1))
- fi->frame += 2047;
+ deprecated_update_frame_base_hack (fi, fi->frame + 2047);
/* Record where the fp got saved. */
fi->extra_info->fp_addr =
if (addr >= get_frame_pc (fi))
{
fi->extra_info->in_prologue = 1;
- fi->frame = read_register (SP_REGNUM);
+ deprecated_update_frame_base_hack (fi, read_register (SP_REGNUM));
}
}
}
if (fi->next && fi->frame == 0)
{
/* Kludge to cause init_prev_frame_info to destroy the new frame. */
- fi->frame = fi->next->frame;
+ deprecated_update_frame_base_hack (fi, fi->next->frame);
deprecated_update_frame_pc_hack (fi, get_frame_pc (fi->next));
}
}
v850_scan_prologue (get_frame_pc (fi), &pi);
if (!fi->next && pi.framereg == E_SP_REGNUM)
- fi->frame = read_register (pi.framereg) - pi.frameoffset;
+ deprecated_update_frame_base_hack (fi, read_register (pi.framereg) - pi.frameoffset);
for (pifsr = pifsrs; pifsr->framereg; pifsr++)
{