gdb: Remove cleanup from linux_nat_target::follow_fork
authorAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 31 Dec 2018 22:20:56 +0000 (22:20 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 3 Jan 2019 21:24:02 +0000 (21:24 +0000)
commit169bb27bce3dc43b2bb5f6abf7fc21c19de5454a
tree53d44279a7d4e81306d70eea2c0234eece5f2eaa
parenta07c88800e88e26fc3a746739f0d2cc8abd30c5d
gdb: Remove cleanup from linux_nat_target::follow_fork

Remove cleanup from linux_nat_target::follow_fork, instead add a new
unique_ptr specialisation for holding lwp_info pointers and use this
to ensure the pointer is cleaned up when needed.

gdb/ChangeLog:

* linux-nat.c (delete_lwp_cleanup): Delete.
(struct lwp_deleter): New struct.
(lwp_info_up): New typedef.
(linux_nat_target::follow_fork): Delete cleanup, and make use of
lwp_info_up.
gdb/ChangeLog
gdb/linux-nat.c