diff options
author | Kevin Buettner <kevinb@redhat.com> | 2002-08-08 23:32:52 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2002-08-08 23:32:52 +0000 |
commit | d28e01f4718314bf3ffb7e0d7132fd11cc4b3036 (patch) | |
tree | b121f6c0a67f98ca9f3ca3ea78cf8a9a7ba75da2 /gdb/mips-tdep.c | |
parent | 7dc213a6bb642601e112cf9c3d7f113677270c07 (diff) | |
download | gdb-d28e01f4718314bf3ffb7e0d7132fd11cc4b3036.zip gdb-d28e01f4718314bf3ffb7e0d7132fd11cc4b3036.tar.gz gdb-d28e01f4718314bf3ffb7e0d7132fd11cc4b3036.tar.bz2 |
* mips-tdep.c (mips_find_saved_regs): Make static.
(mips_frame_init_saved_regs): New function.
(mips_gdbarch_init): Setup FRAME_INIT_SAVED_REGS method.
* config/mips/tm-mips.h (FRAME_INIT_SAVED_REGS): Delete macro.
(mips_find_saved_regs): Delete declaration.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r-- | gdb/mips-tdep.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 650998b..3570a5c 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -1259,7 +1259,7 @@ mips_next_pc (CORE_ADDR pc) /* Guaranteed to set fci->saved_regs to some values (it never leaves it NULL). */ -void +static void mips_find_saved_regs (struct frame_info *fci) { int ireg; @@ -1437,6 +1437,23 @@ mips_find_saved_regs (struct frame_info *fci) fci->saved_regs[PC_REGNUM] = fci->saved_regs[RA_REGNUM]; } +/* Set up the 'saved_regs' array. This is a data structure containing + the addresses on the stack where each register has been saved, for + each stack frame. Registers that have not been saved will have + zero here. The stack pointer register is special: rather than the + address where the stack register has been saved, saved_regs[SP_REGNUM] + will have the actual value of the previous frame's stack register. */ + +static void +mips_frame_init_saved_regs (struct frame_info *frame) +{ + if (frame->saved_regs == NULL) + { + mips_find_saved_regs (frame); + } + frame->saved_regs[SP_REGNUM] = frame->frame; +} + static CORE_ADDR read_next_frame_reg (struct frame_info *fi, int regno) { @@ -4715,6 +4732,7 @@ mips_gdbarch_init (struct gdbarch_info info, /* Initialize a frame */ set_gdbarch_init_extra_frame_info (gdbarch, mips_init_extra_frame_info); + set_gdbarch_frame_init_saved_regs (gdbarch, mips_frame_init_saved_regs); /* MIPS version of CALL_DUMMY */ |