keep_going: Add missing discard_cleanups call
authorPedro Alves <palves@redhat.com>
Thu, 26 Mar 2015 19:05:40 +0000 (19:05 +0000)
committerPedro Alves <palves@redhat.com>
Wed, 1 Apr 2015 14:18:41 +0000 (15:18 +0100)
By inspection, I noticed a path where we return without discarding the
cleanups.

gdb/ChangeLog:
2015-04-01  Pedro Alves  <palves@redhat.com>

* infrun.c (keep_going): Also discard cleanups if inserting
breakpoints fails.

gdb/ChangeLog
gdb/infrun.c

index 8e1bd11a344b1070da8bb8cdaaff620d81ff5b27..f5adaf88cc67e8754e0b0de2002d566b6e43b629 100644 (file)
@@ -1,3 +1,8 @@
+2015-04-01  Pedro Alves  <palves@redhat.com>
+
+       * infrun.c (keep_going): Also discard cleanups if inserting
+       breakpoints fails.
+
 2015-04-01  Pedro Alves  <palves@redhat.com>
 
        * infrun.c (wait_for_inferior): Install the
index 18ce0361b7ee0bda2e1c37f1a03285a74e9f2786..f366a579c61fb498a12b3e90b91fdcbdf48466a3 100644 (file)
@@ -6251,6 +6251,7 @@ keep_going (struct execution_control_state *ecs)
        {
          exception_print (gdb_stderr, e);
          stop_waiting (ecs);
+         discard_cleanups (old_cleanups);
          return;
        }
       END_CATCH