diff options
author | Tom Tromey <tom@tromey.com> | 2018-03-28 15:49:24 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-03-30 13:10:42 -0600 |
commit | 9ae79dac31c2bcbd2f5418da2e12af94060e139a (patch) | |
tree | 3c75e61dca77791339abe7b5d132b49633fbe7d2 /gdb/utils.c | |
parent | f2ab4b4206781d75c76962b3ef7dd08b3489c40e (diff) | |
download | gdb-9ae79dac31c2bcbd2f5418da2e12af94060e139a.zip gdb-9ae79dac31c2bcbd2f5418da2e12af94060e139a.tar.gz gdb-9ae79dac31c2bcbd2f5418da2e12af94060e139a.tar.bz2 |
Remove make_cleanup_unpush_target
This removes make_cleanup_unpush_target, replacing it with a
unique_ptr. This may seem odd, because the object in question is not
actually freed, but unique_ptr provided the necessary functionality.
Tested by the buildbot.
gdb/ChangeLog
2018-03-30 Tom Tromey <tom@tromey.com>
* utils.h (make_cleanup_unpush_target): Remove.
* inf-ptrace.c (struct target_unpusher): New.
(target_unpush_up) New typedef.
(inf_ptrace_create_inferior, inf_ptrace_attach): Use
target_unpush_up.
* utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
Diffstat (limited to 'gdb/utils.c')
-rw-r--r-- | gdb/utils.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/gdb/utils.c b/gdb/utils.c index ee31f39..ee19fed 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -141,24 +141,6 @@ show_pagination_enabled (struct ui_file *file, int from_tty, because while they use the "cleanup API" they are not part of the "cleanup API". */ -/* Helper for make_cleanup_unpush_target. */ - -static void -do_unpush_target (void *arg) -{ - struct target_ops *ops = (struct target_ops *) arg; - - unpush_target (ops); -} - -/* Return a new cleanup that unpushes OPS. */ - -struct cleanup * -make_cleanup_unpush_target (struct target_ops *ops) -{ - return make_cleanup (do_unpush_target, ops); -} - /* Helper for make_cleanup_value_free_to_mark. */ static void |