aboutsummaryrefslogtreecommitdiff
path: root/gdb/config/mips
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1994-01-31 21:22:44 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1994-01-31 21:22:44 +0000
commit14d7956255fe67972d0cfb088803811be7074bbf (patch)
tree965fdffd41c874c1029b329663be5554f4e94396 /gdb/config/mips
parenta7409c5498a70351edf2ce55bd71387965b40bdc (diff)
downloadgdb-14d7956255fe67972d0cfb088803811be7074bbf.zip
gdb-14d7956255fe67972d0cfb088803811be7074bbf.tar.gz
gdb-14d7956255fe67972d0cfb088803811be7074bbf.tar.bz2
* mips-tdep.c: Remove code which sets saved_regs from
init_extra_frame_info and put it in new function mips_find_saved_regs. (READ_FRAME_REG): Remove macro and replace uses with the expansion. * mips-tdep.c, config/mips/tm-mips.h: When examining ->saved_regs, check if it is NULL and call mips_find_saved_regs if so.
Diffstat (limited to 'gdb/config/mips')
-rw-r--r--gdb/config/mips/tm-mips.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h
index 5a56666..7451717 100644
--- a/gdb/config/mips/tm-mips.h
+++ b/gdb/config/mips/tm-mips.h
@@ -272,9 +272,13 @@ extern int in_sigtramp PARAMS ((CORE_ADDR, char *));
ways in the stack frame. sp is even more special:
the address we return for it IS the sp for the next frame. */
-#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) ( \
- (frame_saved_regs) = *(frame_info)->saved_regs, \
- (frame_saved_regs).regs[SP_REGNUM] = (frame_info)->frame)
+#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
+ do { \
+ if ((frame_info)->saved_regs == NULL) \
+ mips_find_saved_regs (frame_info); \
+ (frame_saved_regs) = *(frame_info)->saved_regs; \
+ (frame_saved_regs).regs[SP_REGNUM] = (frame_info)->frame; \
+ } while (0)
/* Things needed for making the inferior call functions. */