aboutsummaryrefslogtreecommitdiff
path: root/gdb/cleanups.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/cleanups.c')
-rw-r--r--gdb/cleanups.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/cleanups.c b/gdb/cleanups.c
index 02db9f5..898e526 100644
--- a/gdb/cleanups.c
+++ b/gdb/cleanups.c
@@ -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;
}