]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 17 Sep 2012 07:17:28 +0000 (07:17 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 17 Sep 2012 07:17:28 +0000 (07:17 +0000)
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/ChangeLog
gdb/frame.c
gdb/infcmd.c
gdb/testsuite/ChangeLog

index d59d2428215b3a953d47b8e3304fcfe8b46db2ef..23976109e6849671fb60481b0bce2bec1b6f398b 100644 (file)
@@ -1,3 +1,10 @@
+2012-09-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       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.
+
 2012-09-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
            Pedro Alves  <palves@redhat.com>
 
index e012f2dbe752d54da5eca88d67886aa2506278a1..b7698733c2aea38d1a2b0c1329325980c5008521 100644 (file)
@@ -309,7 +309,8 @@ fprint_frame (struct ui_file *file, struct frame_info *fi)
 static struct frame_info *
 skip_inlined_frames (struct frame_info *frame)
 {
-  while (get_frame_type (frame) == INLINE_FRAME)
+  while (get_frame_type (frame) == INLINE_FRAME
+        || get_frame_type (frame) == TAILCALL_FRAME)
     frame = get_prev_frame (frame);
 
   return frame;
@@ -814,6 +815,11 @@ frame_pop (struct frame_info *this_frame)
   if (!prev_frame)
     error (_("Cannot pop the initial frame."));
 
+  /* Ignore TAILCALL_FRAME type frames, they were executed already before
+     entering THISFRAME.  */
+  while (get_frame_type (prev_frame) == TAILCALL_FRAME)
+    prev_frame = get_prev_frame (prev_frame);
+
   /* Make a copy of all the register values unwound from this frame.
      Save them in a scratch buffer so that there isn't a race between
      trying to extract the old values from the current regcache while
index 475ac90e1cc4ac3393b26749d31a31db59fd0115..7e31600219e6f555991966f826e551ff8048674e 100644 (file)
@@ -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)));
index 6e193af8ade4a6fe912984a4edcd1045b965082b..40d3f6f08c876b31d6654858b4fea519131fe5cf 100644 (file)
@@ -1,3 +1,13 @@
+2012-09-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       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.
+
 2012-09-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        PR 14548