* gdbarch.sh (get_longjmp_target): Add FRAME argument.

* gdbarch.c, gdbarch.h: Regenerate.
	* infrun.c (handle_inferior_event): Pass current frame to
	gdbarch_get_longjmp_target.

	* alpha-tdep.c (alpha_get_longjmp_target): Add FRAME argument.
	Read registers from FRAME instead of using read_register.
	Use get_frame_arch instead of current_gdbarch.
	* arm-tdep.c (arm_get_longjmp_target): Likewise.
	* i386-tdep.c (i386_get_longjmp_target): Likewise.
	* m68k-tdep.c (m68k_get_longjmp_target): Likewise.
	* mips-linux-tdep.c (mips_linux_get_longjmp_target): Likewise.
	(mips64_linux_get_longjmp_target): Likewise.
	* mipsnbsd-tdep.c (mipsnbsd_get_longjmp_target): Likewise.
This commit is contained in:
Ulrich Weigand
2007-06-15 22:41:13 +00:00
parent 52f729a724
commit 60ade65d49
11 changed files with 42 additions and 24 deletions

View File

@@ -978,11 +978,11 @@ m68k_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
This routine returns true on success. */
static int
m68k_get_longjmp_target (CORE_ADDR *pc)
m68k_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
{
gdb_byte *buf;
CORE_ADDR sp, jb_addr;
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (frame));
if (tdep->jb_pc < 0)
{
@@ -992,7 +992,7 @@ m68k_get_longjmp_target (CORE_ADDR *pc)
}
buf = alloca (gdbarch_ptr_bit (current_gdbarch) / TARGET_CHAR_BIT);
sp = read_register (SP_REGNUM);
sp = get_frame_register_unsigned (frame, SP_REGNUM);
if (target_read_memory (sp + SP_ARG0, /* Offset of first arg on stack */
buf,