Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [rfc] Return old cleanup when doing a restore_cleanups()
@ 2001-08-13 12:28 Andrew Cagney
  2001-08-14 17:37 ` Kevin Buettner
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2001-08-13 12:28 UTC (permalink / raw)
  To: gdb-patches

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);


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-08-15  8:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-13 12:28 [rfc] Return old cleanup when doing a restore_cleanups() Andrew Cagney
2001-08-14 17:37 ` Kevin Buettner
2001-08-15  8:14   ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox