Add push_target overload
authorTom Tromey <tromey@adacore.com>
Wed, 6 Feb 2019 09:54:17 +0000 (02:54 -0700)
committerTom Tromey <tromey@adacore.com>
Fri, 15 Feb 2019 20:53:43 +0000 (13:53 -0700)
commitdea57a626364698759d1525acf9109771d173811
tree7385e42d07f72232fa630e5e370ba26f02906f52
parent989f3c583d31e29029b1b7dd8ffd3afacbbb5c27
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.
gdb/ChangeLog
gdb/corelow.c
gdb/remote.c
gdb/target.c
gdb/target.h