From: Andrew Cagney <ac131313@cygnus.com>
To: gdb-patches@sources.redhat.com
Subject: [rfc] Return old cleanup when doing a restore_cleanups()
Date: Mon, 13 Aug 2001 12:28:00 -0000 [thread overview]
Message-ID: <3B782A6A.2050207@cygnus.com> (raw)
Hello,
The attached patch tweeks the restore_cleanups() family of functions so
that the old cleanup is returned.
In theory, that returned cleanup should be NULL (since the cleanup chain
will have been drained just prior to the restore_cleanups() call). In
reality, I'm not too sure. I'd like to find out what the old chain was
so I can add an assert to certain callers (e.g. catch_errors()).
I guess the alternative is to just stick the assert in
restore_cleanups() and see what breaks.
Thoughts? Preference?
Andrew
Ref: top.c:catch_errors()
/* FIXME: cagney/1999-11-05: A correct FUNC implementation will
clean things up (restoring the cleanup chain) to the state they
were just prior to the call. Unfortunately, many FUNC's are not
that well behaved. This could be fixed by adding either a
do_cleanups call (to cover the problem) or an assertion check to
detect bad FUNCs code. */
/* Restore the cleanup chain and error/quit messages to their
original states. */
restore_cleanups (saved_cleanup_chain);
next reply other threads:[~2001-08-13 12:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-13 12:28 Andrew Cagney [this message]
2001-08-14 17:37 ` Kevin Buettner
2001-08-15 8:14 ` Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3B782A6A.2050207@cygnus.com \
--to=ac131313@cygnus.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox