From 1ab3b62c9dabd92c26377f25146f1d58e3c766a6 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Mon, 17 Sep 2012 07:15:48 +0000 Subject: gdb/ PR 14119 * frame.c (skip_inlined_frames): Skip also TAILCALL_FRAME frames. (frame_pop): Drop also TAILCALL_FRAME frames. * infcmd.c (finish_command): Ignore also TAILCALL_FRAME frames. gdb/testsuite/ PR 14119 * gdb.arch/amd64-tailcall-ret.S: New file. * gdb.arch/amd64-tailcall-ret.c: New file. * gdb.arch/amd64-tailcall-ret.exp: New file. * gdb.reverse/amd64-tailcall-reverse.S: New file. * gdb.reverse/amd64-tailcall-reverse.c: New file. * gdb.reverse/amd64-tailcall-reverse.exp: New file. --- gdb/infcmd.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gdb/infcmd.c') diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 8e2f74e..cce624e 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -1777,6 +1777,11 @@ finish_command (char *arg, int from_tty) return; } + /* Ignore TAILCALL_FRAME type frames, they were executed already before + entering THISFRAME. */ + while (get_frame_type (frame) == TAILCALL_FRAME) + frame = get_prev_frame (frame); + /* Find the function we will return from. */ function = find_pc_function (get_frame_pc (get_selected_frame (NULL))); -- cgit v1.1