diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-09-17 04:54:52 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-09-17 04:54:52 +0000 |
commit | f8efbf2296e731e29df1be4cc391395878846dca (patch) | |
tree | 694ef3b40fa1ecd09137a8a92de5c946031548a7 /gdb/config/a29k | |
parent | e8b114f7f488fc33557c77da584cd3ea8613e388 (diff) | |
download | gdb-f8efbf2296e731e29df1be4cc391395878846dca.zip gdb-f8efbf2296e731e29df1be4cc391395878846dca.tar.gz gdb-f8efbf2296e731e29df1be4cc391395878846dca.tar.bz2 |
* config/a29k/tm-a29k.h (FRAME_CHAIN): If rsize is zero, return zero.
Diffstat (limited to 'gdb/config/a29k')
-rw-r--r-- | gdb/config/a29k/tm-a29k.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/config/a29k/tm-a29k.h b/gdb/config/a29k/tm-a29k.h index 0b027be..ac102da 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) |