mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-02 02:35:00 +08:00
Purge (almost) make_cleanup_func.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user