Implement multiple-filesystem support for remote targets
This commit allows GDB to access executables and shared libraries
on remote targets where the remote stub does not share a common
filesystem with the inferior(s). A new packet "vFile:setfs" is
added to the remote protocol and the three remote hostio functions
with filename arguments are modified to send "vFile:setfs" packets
as necessary.
gdb/ChangeLog:
* remote.c (struct remote_state) <fs_pid>: New field.
(new_remote_state): Initialize the above.
(PACKET_vFile_setfs): New enum value.
(remote_hostio_set_filesystem): New function.
(remote_hostio_open): Call the above.
(remote_hostio_unlink): Likewise.
(remote_hostio_readlink): Likewise.
(_initialize_remote): Register new "set/show remote
hostio-setfs-packet" command.
* NEWS: Announce new vFile:setfs packet.
gdb/doc/ChangeLog:
* gdb.texinfo (Remote Configuration): Document the
"set/show remote hostio-setfs-packet" command.
(Host I/O Packets): Document the vFile:setfs packet.