diff options
author | Tom Tromey <tom@tromey.com> | 2019-01-24 09:56:49 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-03-06 16:04:31 -0700 |
commit | fe7b42e5843ef82f97959e0e18122c164449a8ea (patch) | |
tree | 9324d78cdb2e523c04fc6556882c21280606132f /gdb/common/cleanups.h | |
parent | c6321f19c5414c2a34db3cf5979834d081c32abd (diff) | |
download | binutils-fe7b42e5843ef82f97959e0e18122c164449a8ea.zip binutils-fe7b42e5843ef82f97959e0e18122c164449a8ea.tar.gz binutils-fe7b42e5843ef82f97959e0e18122c164449a8ea.tar.bz2 |
Remove basic cleanup code
This removes the basic cleanup code: make_cleanups, do_cleanups,
discard_cleanups, and friends. This code is no longer needed, as
nothing in gdb makes an ordinary cleanup. Final cleanups are still
needed.
2019-03-06 Tom Tromey <tom@tromey.com>
* top.c (quit_force): Update.
* main.c (captured_command_loop): Update.
* common/new-op.c (operator new): Update.
* common/common-exceptions.c (struct catcher)
<save_cleanup_chain>: Remove member.
(exceptions_state_mc_init): Update.
(exception_try_scope_entry): Return nullptr.
(exception_try_scope_exit, exception_rethrow)
(throw_exception_sjlj, throw_exception_cxx): Update.
* common/cleanups.h (make_cleanup, make_cleanup_dtor)
(all_cleanups, do_cleanups, discard_cleanups)
(discard_final_cleanups, save_cleanups, save_final_cleanups)
(restore_cleanups, restore_final_cleanups): Don't declare.
(do_final_cleanups): Remove parameter.
* common/cleanups.c (cleanup_chain, make_cleanup)
(make_cleanup_dtor, all_cleanups, do_cleanups)
(discard_my_cleanups, discard_cleanups)
(discard_final_cleanups, save_my_cleanups, save_cleanups)
(save_final_cleanups, restore_my_cleanups, restore_cleanups)
(null_cleanup): Remove.
(do_final_cleanups): Remove parameter.
Diffstat (limited to 'gdb/common/cleanups.h')
-rw-r--r-- | gdb/common/cleanups.h | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/gdb/common/cleanups.h b/gdb/common/cleanups.h index f49bcb4..e676076 100644 --- a/gdb/common/cleanups.h +++ b/gdb/common/cleanups.h @@ -32,38 +32,8 @@ typedef void (make_cleanup_ftype) (void *); /* Function type for the dtor in make_cleanup_dtor. */ typedef void (make_cleanup_dtor_ftype) (void *); -/* WARNING: The result of the "make cleanup" routines is not the intuitive - choice of being a handle on the just-created cleanup. Instead it is an - opaque handle of the cleanup mechanism and represents all cleanups created - from that point onwards. - The result is guaranteed to be non-NULL though. */ - -extern struct cleanup *make_cleanup (make_cleanup_ftype *, void *); - -extern struct cleanup *make_cleanup_dtor (make_cleanup_ftype *, void *, - make_cleanup_dtor_ftype *); - extern struct cleanup *make_final_cleanup (make_cleanup_ftype *, void *); -/* A special value to pass to do_cleanups and do_final_cleanups - to tell them to do all cleanups. */ -extern struct cleanup *all_cleanups (void); - -extern void do_cleanups (struct cleanup *); -extern void do_final_cleanups (struct cleanup *); - -extern void discard_cleanups (struct cleanup *); -extern void discard_final_cleanups (struct cleanup *); - -extern struct cleanup *save_cleanups (void); -extern struct cleanup *save_final_cleanups (void); - -extern void restore_cleanups (struct cleanup *); -extern void restore_final_cleanups (struct cleanup *); - -/* A no-op cleanup. - This is useful when you want to establish a known reference point - to pass to do_cleanups. */ -extern void null_cleanup (void *); +extern void do_final_cleanups (); #endif /* COMMON_CLEANUPS_H */ |