From 2886f8b253118f6414e46d6944fb715fb8c92fcb Mon Sep 17 00:00:00 2001 From: John Gilmore Date: Fri, 18 Sep 1992 09:20:15 +0000 Subject: Support for accessing arbitrary MIPS stack frames in memory. * blockframe.c (get_prev_frame_info): If INIT_FRAME_PC_FIRST is set, run it before INIT_EXTRA_FRAME_INFO. * stack.c (frame_info): If PRINT_EXTRA_FRAME_INFO defined, call it. * mips-tdep.c (init_extra_frame_info): Only clobber the `frame' (FP) value in the frame_info struct if it is zero (as from top of execution stack). (setup_arbitrary_frame): Implement FRAME_SPECIFICATION_DYADIC. * mips-xdep.c (fetch_inferior_registers): ZERO_REGNUM always comes back as zero. So does FP_REGNUM, as a trigger for init_extra_frame_info. * tm-mips.h (INIT_FRAME_PC_FIRST): Kludge, FIXME, defined to get the program counter set before INIT_EXTRA_FRAME_INFO is run. (INIT_FRAME_PC): Defined to null. (PRINT_EXTRA_FRAME_INFO): print frame pointer location via symtab. (FRAME_SPECIFICATION_DYADIC): Ask for two args in frame command. Briefly explain MIPS stacks in GDB. --- gdb/mips-xdep.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gdb/mips-xdep.c') diff --git a/gdb/mips-xdep.c b/gdb/mips-xdep.c index 6c0e519..e314bf7 100644 --- a/gdb/mips-xdep.c +++ b/gdb/mips-xdep.c @@ -81,6 +81,8 @@ store_inferior_registers (regno) : regno >= FP0_REGNUM ? FPR_BASE + (regno - FP0_REGNUM) \ : 0) +static const char zerobuf[MAX_REGISTER_RAW_SIZE]; + /* Get all registers from the inferior */ void @@ -104,6 +106,10 @@ fetch_inferior_registers (regno) } supply_register (regno, buf); } + + supply_register (ZERO_REGNUM, zerobuf); + /* Frame ptr reg must appear to be 0; it is faked by stack handling code. */ + supply_register (FP_REGNUM, zerobuf); } /* Store our register values back into the inferior. -- cgit v1.1