Return gdb::optional<std::string> from target_fileio_readlink
authorTom Tromey <tom@tromey.com>
Thu, 23 Nov 2017 06:37:38 +0000 (23:37 -0700)
committerTom Tromey <tom@tromey.com>
Wed, 7 Mar 2018 22:36:28 +0000 (15:36 -0700)
commite0d3522b888033febd153a4a7d3b7c5c13641f09
tree9c5c11152ba3b7202fac5dba1a9f21a35c85d3d5
parentd6ab64818b9d212691c200c292dc0f18d193598c
Return gdb::optional<std::string> from target_fileio_readlink

This changes to_fileio_readlink and target_fileio_readlink to return a
gdb::optional<std::sring>, and then fixes up the callers and
implementations.  This allows the removal of some cleanups.

Regression tested by the buildbot.

gdb/ChangeLog
2018-03-07  Tom Tromey  <tom@tromey.com>

* linux-tdep.c (linux_info_proc): Update.
* target.h (struct target_ops) <to_fileio_readlink>: Return
optional<string>.
(target_fileio_readlink): Return optional<string>.
* remote.c (remote_hostio_readlink): Return optional<string>.
* inf-child.c (inf_child_fileio_readlink): Return
optional<string>.
* target.c (target_fileio_readlink): Return optional<string>.
gdb/ChangeLog
gdb/inf-child.c
gdb/linux-nat.c
gdb/linux-tdep.c
gdb/remote.c
gdb/target.c
gdb/target.h