gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Sun, 5 May 2013 16:56:07 +0000 (16:56 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Sun, 5 May 2013 16:56:07 +0000 (16:56 +0000)
* cleanups.c (restore_my_cleanups): New gdb_assert for SENTINEL_CLEANUP.

gdb/ChangeLog
gdb/cleanups.c

index 75b205c..0bf3699 100644 (file)
@@ -1,5 +1,9 @@
 2013-05-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
+       * cleanups.c (restore_my_cleanups): New gdb_assert for SENTINEL_CLEANUP.
+
+2013-05-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
        * event-top.c (display_gdb_prompt): Call missing do_cleanups.
        * infcmd.c (get_return_value) <!stop_regs>: Do not overwrite CLEANUP.
        * symfile.c (symfile_bfd_open): New variable back_to.  Do not leave
index c403db7..02db9f5 100644 (file)
@@ -261,6 +261,7 @@ save_final_cleanups (void)
 static void
 restore_my_cleanups (struct cleanup **pmy_chain, struct cleanup *chain)
 {
+  gdb_assert (*pmy_chain == SENTINEL_CLEANUP);
   *pmy_chain = chain;
 }