aboutsummaryrefslogtreecommitdiff
path: root/gdb/corelow.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2019-02-06 02:54:17 -0700
committerTom Tromey <tromey@adacore.com>2019-02-15 13:53:43 -0700
commitdea57a626364698759d1525acf9109771d173811 (patch)
tree7385e42d07f72232fa630e5e370ba26f02906f52 /gdb/corelow.c
parent989f3c583d31e29029b1b7dd8ffd3afacbbb5c27 (diff)
downloadbinutils-dea57a626364698759d1525acf9109771d173811.zip
binutils-dea57a626364698759d1525acf9109771d173811.tar.gz
binutils-dea57a626364698759d1525acf9109771d173811.tar.bz2
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.
Diffstat (limited to 'gdb/corelow.c')
-rw-r--r--gdb/corelow.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/corelow.c b/gdb/corelow.c
index 52d6d95..6a29d6a 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -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;