This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] keep_going: Add missing discard_cleanups call


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=de1fe8c8ab7f67856d9f2e2c5aa491cec01d3e85

commit de1fe8c8ab7f67856d9f2e2c5aa491cec01d3e85
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Mar 26 19:05:40 2015 +0000

    keep_going: Add missing discard_cleanups call
    
    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.

Diff:
---
 gdb/ChangeLog | 5 +++++
 gdb/infrun.c  | 1 +
 2 files changed, 6 insertions(+)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8e1bd11..f5adaf8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 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
 	finish_thread_state_cleanup cleanup across the whole function, not
 	just around handle_inferior_event.
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 18ce036..f366a57 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]