From 3f528883aef905c53a418716d7b3230d66a65440 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Thu, 23 Sep 1993 19:03:38 +0000 Subject: [PATCH] * mips-tdep.c (mips_frame_chain): If frame size zero, return zero. * rs6000-tdep.c: Add comment about framelessness. --- gdb/ChangeLog | 1 + gdb/mips-tdep.c | 8 +++++++- gdb/rs6000-tdep.c | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6461cd5..3bc857b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -47,6 +47,7 @@ Wed Sep 22 10:28:06 1993 Jim Kingdon (kingdon@lioth.cygnus.com) retval.step_resume. * mips-tdep.c (mips_frame_chain): If frame size zero, return zero. + * rs6000-tdep.c: Add comment about framelessness. * remote-nindy.c: Declare ninMemGet and ninMemPut. diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index f9193ea..82371aa 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -346,7 +346,13 @@ mips_frame_chain(frame) 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) + && PROC_FRAME_OFFSET (proc_desc) == 0 + /* Frameless functions, which can happen on the innermost frame + or a frame which was innermost when a signal happened, can + have frame size zero. No need to check for non-frameless + functions in these situations, though (I don't think). */ + && frame->next != NULL + && !frame->next->signal_handler_caller) return 0; else return read_next_frame_reg(frame, PROC_FRAME_REG(proc_desc)) diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 3198fc6..012f53b 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -949,6 +949,8 @@ int pcsaved; if (fi->next != NULL) /* Don't even think about framelessness except on the innermost frame. */ + /* FIXME: Can also be frameless if fi->next->signal_handler_caller (if + a signal happens while executing in a frameless function). */ return 0; func_start = get_pc_function_start (fi->pc) + FUNCTION_START_OFFSET; -- 2.7.4