Purge (almost) make_cleanup_func.

This commit is contained in:
Andrew Cagney 2000-05-22 09:02:23 +00:00
parent 32c092c3fa
commit 74b7792f0f
20 changed files with 187 additions and 35 deletions

View file

@ -60,6 +60,8 @@ static void core_detach PARAMS ((char *, int));
static void core_close PARAMS ((int));
static void core_close_cleanup (void *ignore);
static void get_core_registers PARAMS ((int));
static void add_to_thread_list PARAMS ((bfd *, asection *, PTR));
@ -207,6 +209,12 @@ core_close (quitting)
core_vec = NULL;
}
static void
core_close_cleanup (void *ignore)
{
core_close (0/*ignored*/);
}
#ifdef SOLIB_ADD
/* Stub function for catch_errors around shared library hacking. FROM_TTYP
is really an int * which points to from_tty. */
@ -305,7 +313,7 @@ core_open (filename, from_tty)
discard_cleanups (old_chain); /* Don't free filename any more */
unpush_target (&core_ops);
core_bfd = temp_bfd;
old_chain = make_cleanup ((make_cleanup_func) core_close, core_bfd);
old_chain = make_cleanup (core_close_cleanup, 0 /*ignore*/);
/* Find a suitable core file handler to munch on core_bfd */
core_vec = sniff_core_bfd (core_bfd);