This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] ppc: Detect when LR is saved through frame pointer


*** TEST RESULTS FOR COMMIT dd6d677f0b06341dce90d259785c9d513d2e3935 ***

Author: Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
Branch: master
Commit: dd6d677f0b06341dce90d259785c9d513d2e3935

ppc: Detect when LR is saved through frame pointer

This patch extends rs6000-tdep.c:skip_prologue so that it can detect
when the Link Register is saved using the frame pointer (usually r31)
in adition to the stack pointer (r1).

The frame pointer offset from the frame base is tracked separately
from the stack pointer offset for cases when the frame pointer is not
in synch with the stack pointer at the moment of the LR save.

Previously, "stq" could also be detected as an instruction that saves
LR or CR. Because this was likely unintentional, this patch also
restricts the matches to stw/stwu/std/stdu.

gdb/ChangeLog:

	* rs6000-tdep.c (store_insn_p): New function.
	(skip_prologue): New variable alloca_reg_offset. Set lr_reg
	and cr_reg to their unshifted values. Use store_insn_p to
	match LR saves using either R1 or fdata->alloca_reg. Use
	store_insn_p to match CR saves. Set alloca_reg_offset
	when alloca_reg and framep are set. Remove lr_reg shift
	when assigning to fdata->lr_register.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]