gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 14 May 2013 20:39:12 +0000 (20:39 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 14 May 2013 20:39:12 +0000 (20:39 +0000)
* cleanups.c (restore_my_cleanups): Replace gdb_assert by
internal_warning.

gdb/ChangeLog
gdb/cleanups.c

index a620afb8a50c204159428ae170c5566a2e101f6a..8b8200799784f60ee1e5f55c0f8d8cd8de4d7a28 100644 (file)
@@ -1,3 +1,8 @@
+2013-05-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * cleanups.c (restore_my_cleanups): Replace gdb_assert by
+       internal_warning.
+
 2013-05-14  Tom Tromey  <tromey@redhat.com>
 
        * eval.c (parse_and_eval_long): Make 'exp' const.
index 02db9f5cddab413831b993405f9a97fd70bf63d8..898e526e278b2aa0591349b4e41b21cd52f0c558 100644 (file)
@@ -261,7 +261,10 @@ save_final_cleanups (void)
 static void
 restore_my_cleanups (struct cleanup **pmy_chain, struct cleanup *chain)
 {
-  gdb_assert (*pmy_chain == SENTINEL_CLEANUP);
+  if (*pmy_chain != SENTINEL_CLEANUP)
+    internal_warning (__FILE__, __LINE__,
+                     _("restore_my_cleanups has found a stale cleanup"));
+
   *pmy_chain = chain;
 }