diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-09-22 20:33:36 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-09-22 20:33:36 +0000 |
commit | e797b4bc3b650f0c422bcefa5478b08193a26229 (patch) | |
tree | 0a88671da80fa181621ee3867a33697afc55a428 /gdb/mips-tdep.c | |
parent | bdef72d222b9c87a023d511388125c187f74c683 (diff) | |
download | gdb-e797b4bc3b650f0c422bcefa5478b08193a26229.zip gdb-e797b4bc3b650f0c422bcefa5478b08193a26229.tar.gz gdb-e797b4bc3b650f0c422bcefa5478b08193a26229.tar.bz2 |
* mips-tdep.c (mips_frame_chain): If frame size zero, return zero.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r-- | gdb/mips-tdep.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 3ed7c4b..590d1be 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -341,9 +341,12 @@ mips_frame_chain(frame) return 0; cached_proc_desc = proc_desc; - /* If frame size is zero, we must be at end of stack (or otherwise hosed). - If we don't check frame size, we loop forever if we see it == 0. */ - if (PROC_FRAME_OFFSET (proc_desc) == 0) + + /* If no frame pointer and frame size is zero, we must be at end + of stack (or otherwise hosed). If we don't check frame size, + we loop forever if we see a zero size frame. */ + if (PROC_FRAME_REG (proc_desc) == SP_REGNUM + && PROC_FRAME_OFFSET (proc_desc) == 0) return 0; else return read_next_frame_reg(frame, PROC_FRAME_REG(proc_desc)) |