aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2015-03-18 11:19:02 +0000
committerGary Benson <gbenson@redhat.com>2015-03-18 11:19:02 +0000
commit464b0089f0068838a014a8fa27ea2eef536ebada (patch)
treef59a44eb419f46836d9bdbf88cd4a2c488291afd /gdb/remote.c
parentf68f11b76de09dcb0d399814127fbf5227fe8245 (diff)
downloadgdb-464b0089f0068838a014a8fa27ea2eef536ebada.zip
gdb-464b0089f0068838a014a8fa27ea2eef536ebada.tar.gz
gdb-464b0089f0068838a014a8fa27ea2eef536ebada.tar.bz2
Reimplement "vFile:fstat" without qSupported
This commit makes support for the "vFile:fstat" packet be detected by probing rather than using qSupported, for consistency with the other vFile: packets. gdb/ChangeLog: (remote_protocol_features): Remove the "vFile:fstat" feature. (remote_hostio_fstat): Probe for "vFile:fstat" support. gdb/doc/ChangeLog: * gdb.texinfo (General Query Packets): Remove documentation for now-removed vFile:fstat qSupported features. gdb/gdbserver/ChangeLog: * server.c (handle_query): Do not report vFile:fstat as supported.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 9aaee13..dfa68b3 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -4049,8 +4049,6 @@ static const struct protocol_feature remote_protocol_features[] = {
PACKET_Qbtrace_conf_bts_size },
{ "swbreak", PACKET_DISABLE, remote_supported_packet, PACKET_swbreak_feature },
{ "hwbreak", PACKET_DISABLE, remote_supported_packet, PACKET_hwbreak_feature },
- { "vFile:fstat", PACKET_DISABLE, remote_supported_packet,
- PACKET_vFile_fstat },
};
static char *remote_support_xml;
@@ -10084,8 +10082,18 @@ remote_hostio_fstat (struct target_ops *self,
struct fio_stat fst;
int read_len;
- if (packet_support (PACKET_vFile_fstat) != PACKET_ENABLE)
+ remote_buffer_add_string (&p, &left, "vFile:fstat:");
+
+ remote_buffer_add_int (&p, &left, fd);
+
+ ret = remote_hostio_send_command (p - rs->buf, PACKET_vFile_fstat,
+ remote_errno, &attachment,
+ &attachment_len);
+ if (ret < 0)
{
+ if (*remote_errno != FILEIO_ENOSYS)
+ return ret;
+
/* Strictly we should return -1, ENOSYS here, but when
"set sysroot remote:" was implemented in August 2008
BFD's need for a stat function was sidestepped with
@@ -10104,16 +10112,6 @@ remote_hostio_fstat (struct target_ops *self,
return 0;
}
- remote_buffer_add_string (&p, &left, "vFile:fstat:");
-
- remote_buffer_add_int (&p, &left, fd);
-
- ret = remote_hostio_send_command (p - rs->buf, PACKET_vFile_fstat,
- remote_errno, &attachment,
- &attachment_len);
- if (ret < 0)
- return ret;
-
read_len = remote_unescape_input ((gdb_byte *) attachment, attachment_len,
(gdb_byte *) &fst, sizeof (fst));