aboutsummaryrefslogtreecommitdiff
path: root/gdb/mips-xdep.c
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1992-09-18 09:20:15 +0000
committerJohn Gilmore <gnu@cygnus>1992-09-18 09:20:15 +0000
commit2886f8b253118f6414e46d6944fb715fb8c92fcb (patch)
treefd2157f4c290f72448f33a3409e5d3e6fb7ed3e8 /gdb/mips-xdep.c
parent68ca3238035c852839a87667aebf3674279d7aba (diff)
downloadgdb-2886f8b253118f6414e46d6944fb715fb8c92fcb.zip
gdb-2886f8b253118f6414e46d6944fb715fb8c92fcb.tar.gz
gdb-2886f8b253118f6414e46d6944fb715fb8c92fcb.tar.bz2
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.
Diffstat (limited to 'gdb/mips-xdep.c')
-rw-r--r--gdb/mips-xdep.c6
1 files changed, 6 insertions, 0 deletions
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.