diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-09-22 19:31:42 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-09-22 19:31:42 +0000 |
commit | bdef72d222b9c87a023d511388125c187f74c683 (patch) | |
tree | 279925e85a3d6f9d4c1bc43a076864a21d49eaa7 /gdb/mips-tdep.c | |
parent | 07a5991a095f75d6869c8bc62ab0308ad465ad6e (diff) | |
download | gdb-bdef72d222b9c87a023d511388125c187f74c683.zip gdb-bdef72d222b9c87a023d511388125c187f74c683.tar.gz gdb-bdef72d222b9c87a023d511388125c187f74c683.tar.bz2 |
* mips-tdep.c (mips_frame_chain): If PROC_FRAME_OFFSET is zero,
then return zero.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r-- | gdb/mips-tdep.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index d2d712a..3ed7c4b 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -341,8 +341,13 @@ mips_frame_chain(frame) return 0; cached_proc_desc = proc_desc; - return read_next_frame_reg(frame, PROC_FRAME_REG(proc_desc)) - + PROC_FRAME_OFFSET(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) + return 0; + else + return read_next_frame_reg(frame, PROC_FRAME_REG(proc_desc)) + + PROC_FRAME_OFFSET(proc_desc); } void @@ -943,7 +948,10 @@ Turn off to avoid using floating point instructions when calling functions\n\ or dealing with return values.", &setlist), &showlist); - c = add_set_cmd ("heuristic-fence-post", class_support, var_uinteger, + /* We really would like to have both "0" and "unlimited" work, but + command.c doesn't deal with that. So make it a var_zinteger + because the user can always use "999999" or some such for unlimited. */ + c = add_set_cmd ("heuristic-fence-post", class_support, var_zinteger, (char *) &heuristic_fence_post, "\ Set the distance searched for the start of a function.\n\ |