From: Jim Kingdon Date: Fri, 17 Sep 1993 04:54:52 +0000 (+0000) Subject: * config/a29k/tm-a29k.h (FRAME_CHAIN): If rsize is zero, return zero. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f8efbf2296e731e29df1be4cc391395878846dca;p=binutils-gdb.git * config/a29k/tm-a29k.h (FRAME_CHAIN): If rsize is zero, return zero. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b0902ad0db0..3dff28e8b51 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +Thu Sep 16 20:37:06 1993 Jim Kingdon (kingdon@cirdan.cygnus.com) + + * config/a29k/tm-a29k.h (FRAME_CHAIN): If rsize is zero, return zero. + Thu Sep 16 13:16:22 1993 Stu Grossman (grossman at cygnus.com) * infrun.c (wait_for_inferior): Allow user to single step within diff --git a/gdb/config/a29k/tm-a29k.h b/gdb/config/a29k/tm-a29k.h index 0b027bebb46..ac102da06ce 100644 --- a/gdb/config/a29k/tm-a29k.h +++ b/gdb/config/a29k/tm-a29k.h @@ -482,7 +482,12 @@ void init_frame_pc (); /* These are mostly dummies for the a29k because INIT_FRAME_PC sets prev->frame instead. */ -#define FRAME_CHAIN(thisframe) ((thisframe)->frame + (thisframe)->rsize) +/* If rsize is zero, we must be at end of stack (or otherwise hosed). + If we don't check rsize, we loop forever if we see rsize == 0. */ +#define FRAME_CHAIN(thisframe) \ + ((thisframe)->rsize == 0 \ + ? 0 \ + : (thisframe)->frame + (thisframe)->rsize) /* Determine if the frame has a 'previous' and back-traceable frame. */ #define FRAME_IS_UNCHAINED(frame) ((frame)->flags & TRANSPARENT)