diff options
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r-- | gdb/infcmd.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 930dc61..a80bf0a 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -2000,10 +2000,6 @@ finish_command (char *arg, int from_tty) return; } - /* Ignore TAILCALL_FRAME type frames, they were executed already before - entering THISFRAME. */ - frame = skip_tailcall_frames (frame); - /* Find the function we will return from. */ sm->function = find_pc_function (get_frame_pc (get_selected_frame (NULL))); @@ -2030,7 +2026,16 @@ finish_command (char *arg, int from_tty) if (execution_direction == EXEC_REVERSE) finish_backward (sm); else - finish_forward (sm, frame); + { + /* Ignore TAILCALL_FRAME type frames, they were executed already before + entering THISFRAME. */ + frame = skip_tailcall_frames (frame); + + if (frame == NULL) + error (_("Cannot find the caller frame.")); + + finish_forward (sm, frame); + } } |