mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
Add push_target overload
This adds a push_target overload that takes a "target_ops_up &&". This removes some calls to release a target_ops_up, and makes the intent here clearer. gdb/ChangeLog 2019-02-15 Tom Tromey <tromey@adacore.com> * target.h (push_target): Declare new overload. * target.c (push_target): New overload, taking an rvalue reference. * remote.c (remote_target::open_1): Use push_target overload. * corelow.c (core_target_open): Use push_target overload.
This commit is contained in:
@@ -417,8 +417,7 @@ core_target_open (const char *arg, int from_tty)
|
||||
if (!exec_bfd)
|
||||
set_gdbarch_from_file (core_bfd);
|
||||
|
||||
push_target (target);
|
||||
target_holder.release ();
|
||||
push_target (std::move (target_holder));
|
||||
|
||||
inferior_ptid = null_ptid;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user