From 5821aace701864d3aced34c974db27de52b0160c Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Tue, 14 May 2013 20:39:12 +0000 Subject: [PATCH] gdb/ * cleanups.c (restore_my_cleanups): Replace gdb_assert by internal_warning. --- gdb/ChangeLog | 5 +++++ gdb/cleanups.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a620afb8a50..8b820079978 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-05-14 Jan Kratochvil + + * cleanups.c (restore_my_cleanups): Replace gdb_assert by + internal_warning. + 2013-05-14 Tom Tromey * eval.c (parse_and_eval_long): Make 'exp' const. diff --git a/gdb/cleanups.c b/gdb/cleanups.c index 02db9f5cdda..898e526e278 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; } -- 2.30.2