(frame_sp_unwind): Use frame_unwind_register_unsigned instead.
* frame.h (frame_unwind_unsigned_register): Delete prototype.
* alpha-linux-tdep.c, alpha-mdebug-tdep.c, alpha-tdep.c,
avr-tdep.c, cris-tdep.c, frv-tdep.c, m68hc11-tdep.c, mn10300-tdep.c,
mt-tdep.c: Replace frame_unwind_unsigned_register with
frame_unwind_register_unsigned.
* gdbint.texinfo (Target Conditionals): Use
frame_unwind_register_unsigned in examples instead of
frame_unwind_unsigned_register.
+2007-10-17 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * frame.c (frame_unwind_unsigned_register): Delete.
+ (frame_sp_unwind): Use frame_unwind_register_unsigned instead.
+ * frame.h (frame_unwind_unsigned_register): Delete prototype.
+
+ * alpha-linux-tdep.c, alpha-mdebug-tdep.c, alpha-tdep.c,
+ avr-tdep.c, cris-tdep.c, frv-tdep.c, m68hc11-tdep.c, mn10300-tdep.c,
+ mt-tdep.c: Replace frame_unwind_unsigned_register with
+ frame_unwind_register_unsigned.
+
2007-10-16 Pedro Alves <pedro_alves@portugalmail.pt>
* config/i386/mingw.mh, config/i386/mingw.mt: New files.
long off;
pc = frame_pc_unwind (next_frame);
- frame_unwind_unsigned_register (next_frame, ALPHA_SP_REGNUM, &sp);
+ sp = frame_unwind_register_unsigned (next_frame, ALPHA_SP_REGNUM);
off = alpha_linux_sigtramp_offset (pc);
gdb_assert (off >= 0);
info->saved_regs = frame_obstack_zalloc (SIZEOF_FRAME_SAVED_REGS);
/* The VFP of the frame is at FRAME_REG+FRAME_OFFSET. */
- frame_unwind_unsigned_register (next_frame, PROC_FRAME_REG (proc_desc), &vfp);
+ vfp = frame_unwind_register_unsigned (next_frame, PROC_FRAME_REG (proc_desc));
vfp += PROC_FRAME_OFFSET (info->proc_desc);
info->vfp = vfp;
return_reg = ALPHA_RA_REGNUM;
info->return_reg = return_reg;
- frame_unwind_unsigned_register (next_frame, frame_reg, &val);
+ val = frame_unwind_register_unsigned (next_frame, frame_reg);
info->vfp = val + frame_size;
/* Convert offsets to absolute addresses. See above about adding
alpha_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
ULONGEST base;
- frame_unwind_unsigned_register (next_frame, ALPHA_SP_REGNUM, &base);
+ base = frame_unwind_register_unsigned (next_frame, ALPHA_SP_REGNUM);
return frame_id_build (base, frame_pc_unwind (next_frame));
}
alpha_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
ULONGEST pc;
- frame_unwind_unsigned_register (next_frame, ALPHA_PC_REGNUM, &pc);
+ pc = frame_unwind_register_unsigned (next_frame, ALPHA_PC_REGNUM);
return pc;
}
/* The SP was moved to the FP. This indicates that a new frame
was created. Get THIS frame's FP value by unwinding it from
the next frame. */
- frame_unwind_unsigned_register (next_frame, AVR_FP_REGNUM, &this_base);
- frame_unwind_unsigned_register (next_frame, AVR_FP_REGNUM+1, &high_base);
+ this_base = frame_unwind_register_unsigned (next_frame, AVR_FP_REGNUM);
+ high_base = frame_unwind_register_unsigned (next_frame, AVR_FP_REGNUM+1);
this_base += (high_base << 8);
/* The FP points at the last saved register. Adjust the FP back
{
/* Assume that the FP is this frame's SP but with that pushed
stack space added back. */
- frame_unwind_unsigned_register (next_frame, AVR_SP_REGNUM, &this_base);
+ this_base = frame_unwind_register_unsigned (next_frame, AVR_SP_REGNUM);
prev_sp = this_base + info->size;
}
{
ULONGEST pc;
- frame_unwind_unsigned_register (next_frame, AVR_PC_REGNUM, &pc);
+ pc = frame_unwind_register_unsigned (next_frame, AVR_PC_REGNUM);
return avr_make_iaddr (pc);
}
{
ULONGEST sp;
- frame_unwind_unsigned_register (next_frame, AVR_SP_REGNUM, &sp);
+ sp = frame_unwind_register_unsigned (next_frame, AVR_SP_REGNUM);
return avr_make_saddr (sp);
}
{
ULONGEST base;
- frame_unwind_unsigned_register (next_frame, AVR_SP_REGNUM, &base);
+ base = frame_unwind_register_unsigned (next_frame, AVR_SP_REGNUM);
return frame_id_build (avr_make_saddr (base), frame_pc_unwind (next_frame));
}
/* The SP was moved to the FP. This indicates that a new frame
was created. Get THIS frame's FP value by unwinding it from
the next frame. */
- frame_unwind_unsigned_register (next_frame, CRIS_FP_REGNUM,
- &this_base);
+ this_base = frame_unwind_register_unsigned (next_frame, CRIS_FP_REGNUM);
info->base = this_base;
info->saved_regs[CRIS_FP_REGNUM].addr = info->base;
ULONGEST this_base;
/* Assume that the FP is this frame's SP but with that pushed
stack space added back. */
- frame_unwind_unsigned_register (next_frame, gdbarch_sp_regnum (gdbarch),
- &this_base);
+ this_base = frame_unwind_register_unsigned (next_frame,
+ gdbarch_sp_regnum (gdbarch));
info->base = this_base;
info->prev_sp = info->base + info->size;
}
}
/* The SP is assumed to be unaltered. */
- frame_unwind_unsigned_register (next_frame, gdbarch_sp_regnum (gdbarch),
- &this_base);
+ this_base = frame_unwind_register_unsigned (next_frame,
+ gdbarch_sp_regnum (gdbarch));
info->base = this_base;
info->prev_sp = this_base;
cris_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
ULONGEST pc;
- frame_unwind_unsigned_register (next_frame,
- gdbarch_pc_regnum (gdbarch), &pc);
+ pc = frame_unwind_register_unsigned (next_frame,
+ gdbarch_pc_regnum (gdbarch));
return pc;
}
cris_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
ULONGEST sp;
- frame_unwind_unsigned_register (next_frame,
- gdbarch_sp_regnum (gdbarch), &sp);
+ sp = frame_unwind_register_unsigned (next_frame,
+ gdbarch_sp_regnum (gdbarch));
return sp;
}
+2007-10-17 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * gdbint.texinfo (Target Conditionals): Use
+ frame_unwind_register_unsigned in examples instead of
+ frame_unwind_unsigned_register.
+
2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
* gdb.texinfo (Predefined Target Types): Add int128
@smallexample
ULONGEST pc;
-pc = frame_unwind_unsigned_register (next_frame, S390_PC_REGNUM);
+pc = frame_unwind_register_unsigned (next_frame, S390_PC_REGNUM);
return gdbarch_addr_bits_remove (gdbarch, pc);
@end smallexample
@smallexample
ULONGEST sp;
-sp = frame_unwind_unsigned_register (next_frame, S390_SP_REGNUM);
+sp = frame_unwind_register_unsigned (next_frame, S390_SP_REGNUM);
return gdbarch_addr_bits_remove (gdbarch, sp);
@end smallexample
return frame_unwind_register_unsigned (frame->next, regnum);
}
-void
-frame_unwind_unsigned_register (struct frame_info *frame, int regnum,
- ULONGEST *val)
-{
- gdb_byte buf[MAX_REGISTER_SIZE];
- frame_unwind_register (frame, regnum, buf);
- (*val) = extract_unsigned_integer (buf,
- register_size (get_frame_arch (frame),
- regnum));
-}
-
void
put_frame_register (struct frame_info *frame, int regnum,
const gdb_byte *buf)
/* Now things are really are grim. Hope that the value returned by
the gdbarch_sp_regnum register is meaningful. */
if (gdbarch_sp_regnum (gdbarch) >= 0)
- {
- ULONGEST sp;
- frame_unwind_unsigned_register (next_frame,
- gdbarch_sp_regnum (gdbarch), &sp);
- return sp;
- }
+ return frame_unwind_register_unsigned (next_frame,
+ gdbarch_sp_regnum (gdbarch));
internal_error (__FILE__, __LINE__, _("Missing unwind SP method"));
}
int regnum);
-/* Use frame_unwind_register_signed. */
-extern void frame_unwind_unsigned_register (struct frame_info *frame,
- int regnum, ULONGEST *val);
-
/* Get the value of the register that belongs to this FRAME. This
function is a wrapper to the call sequence ``frame_register_unwind
(get_next_frame (FRAME))''. As per frame_register_unwind(), if
because instructions may save relative to the SP, but we need
their addresses relative to the FP. */
if (fp_set)
- frame_unwind_unsigned_register (next_frame, fp_regnum, &this_base);
+ this_base = frame_unwind_register_unsigned (next_frame, fp_regnum);
else
- frame_unwind_unsigned_register (next_frame, sp_regnum, &this_base);
+ this_base = frame_unwind_register_unsigned (next_frame, sp_regnum);
for (i = 0; i < 64; i++)
if (gr_saved[i])
{
ULONGEST pc;
- frame_unwind_unsigned_register (next_frame, gdbarch_pc_regnum (gdbarch),
- &pc);
+ pc = frame_unwind_register_unsigned (next_frame, gdbarch_pc_regnum (gdbarch));
return pc;
}
/* The SP was moved to the FP. This indicates that a new frame
was created. Get THIS frame's FP value by unwinding it from
the next frame. */
- frame_unwind_unsigned_register (next_frame, SOFT_FP_REGNUM, &this_base);
+ this_base = frame_unwind_register_unsigned (next_frame, SOFT_FP_REGNUM);
if (this_base == 0)
{
info->base = 0;
if (info->sp_offset != (CORE_ADDR) -1)
{
info->saved_regs[HARD_PC_REGNUM].addr = info->sp_offset;
- frame_unwind_unsigned_register (next_frame, HARD_SP_REGNUM, &this_base);
+ this_base = frame_unwind_register_unsigned (next_frame, HARD_SP_REGNUM);
prev_sp = this_base + info->sp_offset + 2;
this_base += STACK_CORRECTION;
}
m68hc11_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
ULONGEST sp;
- frame_unwind_unsigned_register (next_frame, HARD_SP_REGNUM, &sp);
+ sp = frame_unwind_register_unsigned (next_frame, HARD_SP_REGNUM);
return sp;
}
ULONGEST tos;
CORE_ADDR pc = frame_pc_unwind (next_frame);
- frame_unwind_unsigned_register (next_frame, SOFT_FP_REGNUM, &tos);
+ tos = frame_unwind_register_unsigned (next_frame, SOFT_FP_REGNUM);
tos += 2;
return frame_id_build (tos, pc);
}
{
ULONGEST pc;
- frame_unwind_unsigned_register (next_frame, E_PC_REGNUM, &pc);
+ pc = frame_unwind_register_unsigned (next_frame, E_PC_REGNUM);
return pc;
}
{
ULONGEST sp;
- frame_unwind_unsigned_register (next_frame, E_SP_REGNUM, &sp);
+ sp = frame_unwind_register_unsigned (next_frame, E_SP_REGNUM);
return sp;
}
/* Grab the frame-relative values of SP and FP, needed below.
The frame_saved_register function will find them on the
stack or in the registers as appropriate. */
- frame_unwind_unsigned_register (next_frame, MT_SP_REGNUM, &sp);
- frame_unwind_unsigned_register (next_frame, MT_FP_REGNUM, &fp);
+ sp = frame_unwind_register_unsigned (next_frame, MT_SP_REGNUM);
+ fp = frame_unwind_register_unsigned (next_frame, MT_FP_REGNUM);
start_addr = frame_func_unwind (next_frame, NORMAL_FRAME);
{
ULONGEST pc;
- frame_unwind_unsigned_register (next_frame, MT_PC_REGNUM, &pc);
+ pc = frame_unwind_register_unsigned (next_frame, MT_PC_REGNUM);
return pc;
}
{
ULONGEST sp;
- frame_unwind_unsigned_register (next_frame, MT_SP_REGNUM, &sp);
+ sp = frame_unwind_register_unsigned (next_frame, MT_SP_REGNUM);
return sp;
}