diff options
author | Gary Benson <gbenson@redhat.com> | 2015-06-10 14:28:44 +0100 |
---|---|---|
committer | Gary Benson <gbenson@redhat.com> | 2015-06-10 14:28:44 +0100 |
commit | 15a201c844e770d3c6edf174b9ef6596fbae7eb2 (patch) | |
tree | 3256ab18ea0ef36a50bdfb7edfeb948f040d5588 /gdb/doc | |
parent | 7a6a173129107538574949116c0ce1c0ead589b4 (diff) | |
download | gdb-15a201c844e770d3c6edf174b9ef6596fbae7eb2.zip gdb-15a201c844e770d3c6edf174b9ef6596fbae7eb2.tar.gz gdb-15a201c844e770d3c6edf174b9ef6596fbae7eb2.tar.bz2 |
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.
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 18 |
2 files changed, 24 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index a9a8137..9264cfa 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,5 +1,11 @@ 2015-06-10 Gary Benson <gbenson@redhat.com> + * gdb.texinfo (Remote Configuration): Document the + "set/show remote hostio-setfs-packet" command. + (Host I/O Packets): Document the vFile:setfs packet. + +2015-06-10 Gary Benson <gbenson@redhat.com> + * gdb.texinfo (Debugging Output): Document the "set/show debug linux-namespaces" command. diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 4bb092c..f502143 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -19916,6 +19916,10 @@ are: @tab @code{vFile:fstat} @tab Host I/O +@item @code{hostio-setfs-packet} +@tab @code{vFile:setfs} +@tab Host I/O + @item @code{noack-packet} @tab @code{QStartNoAckMode} @tab Packet acknowledgment @@ -37742,6 +37746,20 @@ attachment (i.e.@: a trailing semicolon). The return value is the number of target bytes read; the binary attachment may be longer if some characters were escaped. +@item vFile:setfs: @var{pid} +Select the filesystem on which @code{vFile} operations with +@var{filename} arguments will operate. This is required for +@value{GDBN} to be able to access files on remote targets where +the remote stub does not share a common filesystem with the +inferior(s). + +If @var{pid} is nonzero, select the filesystem as seen by process +@var{pid}. If @var{pid} is zero, select the filesystem as seen by +the remote stub. Return 0 on success, or -1 if an error occurs. +If @code{vFile:setfs:} indicates success, the selected filesystem +remains selected until the next successful @code{vFile:setfs:} +operation. + @end table @node Interrupts |