From e797b4bc3b650f0c422bcefa5478b08193a26229 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Wed, 22 Sep 1993 20:33:36 +0000 Subject: [PATCH] * mips-tdep.c (mips_frame_chain): If frame size zero, return zero. --- gdb/ChangeLog | 3 +-- gdb/mips-tdep.c | 9 ++++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 235330f..46a4473 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -3,8 +3,7 @@ Wed Sep 22 10:28:06 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * breakpoint.c (bpstat_what): Initialize retval.call_dummy and retval.step_resume. - * mips-tdep.c (mips_frame_chain): If PROC_FRAME_OFFSET is zero, - then return zero. + * mips-tdep.c (mips_frame_chain): If frame size zero, return zero. * remote-nindy.c: Declare ninMemGet and ninMemPut. 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)) -- 2.7.4