+2017-12-06 Pedro Alves <palves@redhat.com>
+
+ * remote.c (remote_query_supported): Don't send "xmlRegisters=" if
+ "qXfer:features:read"" is disabled.
+ (remote_write_qxfer, remote_read_qxfer, remote_search_memory):
+ Check packet_config_support instead of packet->support directly.
+
2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
* target-descriptions.c (struct tdesc_feature) <registers>: Use
/* Keep this one last to work around a gdbserver <= 7.10 bug in
the qSupported:xmlRegisters=i386 handling. */
- if (remote_support_xml != NULL)
+ if (remote_support_xml != NULL
+ && packet_support (PACKET_qXfer_features) != PACKET_DISABLE)
q = remote_query_supported_append (q, remote_support_xml);
q = reconcat (q, "qSupported:", q, (char *) NULL);
struct remote_state *rs = get_remote_state ();
int max_size = get_memory_write_packet_size ();
- if (packet->support == PACKET_DISABLE)
+ if (packet_config_support (packet) == PACKET_DISABLE)
return TARGET_XFER_E_IO;
/* Insert header. */
struct remote_state *rs = get_remote_state ();
LONGEST i, n, packet_len;
- if (packet->support == PACKET_DISABLE)
+ if (packet_config_support (packet) == PACKET_DISABLE)
return TARGET_XFER_E_IO;
/* Check whether we've cached an end-of-object packet that matches
int found;
ULONGEST found_addr;
- /* Don't go to the target if we don't have to.
- This is done before checking packet->support to avoid the possibility that
- a success for this edge case means the facility works in general. */
+ /* Don't go to the target if we don't have to. This is done before
+ checking packet_config_support to avoid the possibility that a
+ success for this edge case means the facility works in
+ general. */
if (pattern_len > search_space_len)
return 0;
if (pattern_len == 0)
{
/* The request may not have worked because the command is not
supported. If so, fall back to the simple way. */
- if (packet->support == PACKET_DISABLE)
+ if (packet_config_support (packet) == PACKET_DISABLE)
{
return simple_search_memory (ops, start_addr, search_space_len,
pattern, pattern_len, found_addrp);
".. = \\{f = \\{[expr $r + 10], $r.125, $r.25, $r.375, $r.5, $r.625, $r.75, $r.875\\}\\}.*" \
"check contents of data\[$r\]"
}
+
+# If testing with a remote protocol target, check that we can
+# force-disable the use of XML descriptions. This should make the
+# client/server fallback to the pre-XML register file.
+
+with_test_prefix "force-disable xml descriptions" {
+ if {[target_info gdb_protocol] == "remote"
+ || [target_info gdb_protocol] == "extended-remote"} {
+
+ save_vars { GDBFLAGS } {
+ append GDBFLAGS " -ex \"set remote target-features-packet off\""
+ clean_restart ${binfile}
+ }
+
+ if ![runto_main] then {
+ fail "run to main"
+ return
+ }
+
+ # With qXfer:features:read disabled, we won't know anything
+ # about YMM registers.
+ gdb_test "print \$ymm0" " = void"
+ gdb_test "print \$xmm0" "v4_float.*"
+ }
+}