aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2015-03-11 17:53:57 +0000
committerGary Benson <gbenson@redhat.com>2015-03-11 17:53:57 +0000
commit0a93529c56714b1da3d7106d3e0300764f8bb81c (patch)
treeca2c7189bcd064a370e9f2f52f9531c2ae72c592 /gdb/doc
parent791c00567a7ccbae3d71e3b63ac43c0b555079dc (diff)
downloadgdb-0a93529c56714b1da3d7106d3e0300764f8bb81c.zip
gdb-0a93529c56714b1da3d7106d3e0300764f8bb81c.tar.gz
gdb-0a93529c56714b1da3d7106d3e0300764f8bb81c.tar.bz2
Implement remote_bfd_iovec_stat
This commit adds a new packet "vFile:fstat:" to the remote protocol that can be used by to retrieve information about files that have been previously opened using vFile:open. vFile:fstat: support is added to GDB, and remote_bfd_iovec_stat is implemented using it. If vFile:fstat: is not supported by the remote GDB creates a dummy result by zeroing the supplied stat structure and setting its st_size field to INT_MAX. This mimics GDB's previous behaviour, with the exception that GDB did not previously zero the structure so all other fields would have been returned unchanged, which is to say very likely populated with random values from the stack. gdb/ChangeLog: * remote-fileio.h (remote_fileio_to_host_stat): New declaration. * remote-fileio.c (remote_fileio_to_host_uint): New function. (remote_fileio_to_host_ulong): Likewise. (remote_fileio_to_host_mode): Likewise. (remote_fileio_to_host_time): Likewise. (remote_fileio_to_host_stat): Likewise. * remote.c (PACKET_vFile_fstat): New enum value. (remote_protocol_features): Register the "vFile:fstat" feature. (remote_hostio_fstat): New function. (remote_bfd_iovec_stat): Use the above. (_initialize_remote): Register new "set/show remote hostio-fstat-packet" command. * symfile.c (separate_debug_file_exists): Update comment. * NEWS: Announce new vFile:fstat packet. gdb/doc/ChangeLog: * gdb.texinfo (Remote Configuration): Document the "set/show remote hostio-fstat-packet" command. (General Query Packets): Document the vFile:fstat qSupported features. (Host I/O Packets): Document the vFile:fstat packet.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog8
-rw-r--r--gdb/doc/gdb.texinfo23
2 files changed, 31 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 0a1db36..5efb060 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,11 @@
+2015-03-11 Gary Benson <gbenson@redhat.com>
+
+ * gdb.texinfo (Remote Configuration): Document the
+ "set/show remote hostio-fstat-packet" command.
+ (General Query Packets): Document the vFile:fstat
+ qSupported features.
+ (Host I/O Packets): Document the vFile:fstat packet.
+
2015-03-11 Andy Wingo <wingo@igalia.com>
* guile.texi (Objfiles In Guile): Document objfile-progspace.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 4b76ce9..9e71642 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -19748,6 +19748,10 @@ are:
@tab @code{vFile:readlink}
@tab Host I/O
+@item @code{hostio-fstat-packet}
+@tab @code{vFile:fstat}
+@tab Host I/O
+
@item @code{noack-packet}
@tab @code{QStartNoAckMode}
@tab Packet acknowledgment
@@ -36058,6 +36062,11 @@ These are the currently defined stub features and their properties:
@tab @samp{-}
@tab No
+@item @samp{vFile:fstat}
+@tab No
+@tab @samp{-}
+@tab No
+
@end multitable
These are the currently defined stub features, in more detail:
@@ -36246,6 +36255,9 @@ breakpoints.
The remote stub reports the @samp{hwbreak} stop reason for hardware
breakpoints.
+@item vFile:fstat
+The remote stub understands the @samp{vFile:fstat} packet.
+
@end table
@item qSymbol::
@@ -37407,6 +37419,17 @@ packet is used. @samp{vFile:write} returns the number of bytes written,
which may be shorter than the length of @var{data}, or -1 if an
error occurred.
+@item vFile:fstat: @var{fd}
+Get information about the open file corresponding to @var{fd}.
+On success the information is returned as a binary attachment
+and the return value is the size of this attachment in bytes.
+If an error occurs the return value is -1. The format of the
+returned binary attachment is as described in @ref{struct stat}.
+
+This packet is not probed by default; the remote stub must request
+it, by supplying an appropriate @samp{qSupported} response
+(@pxref{qSupported}).
+
@item vFile:unlink: @var{filename}
Delete the file at @var{filename} on the target. Return 0,
or -1 if an error occurs. The @var{filename} is a string.