remote: Make qXfer packets respect corresponding "set remote foo-packet"
authorPedro Alves <palves@redhat.com>
Wed, 6 Dec 2017 11:28:47 +0000 (11:28 +0000)
committerPedro Alves <palves@redhat.com>
Wed, 6 Dec 2017 11:28:47 +0000 (11:28 +0000)
commit7cc244debb587d0f6179d80b5ca9b0ee86e9ab72
tree8a275640aaa6ea072711d904cd14090a1d770485
parent846fefbdb2280374ad91afca3d24fa0c3fa26f96
remote: Make qXfer packets respect corresponding "set remote foo-packet"

I've noticed that "set remote target-features-packet off" before
connecting has no effect -- GDB still fetches a target description
anyway.

The problem is that while most "set remote foo-packet" commands were
fixed by:

  From 4082afcc3d1af9d8063d1c8e02deb34a8b97a489 Mon Sep 17 00:00:00 2001
  From: Pedro Alves <palves@redhat.com>
  Date: Fri, 25 Apr 2014 18:07:02 +0100
  Subject: [PATCH] Fix several "set remote foo-packet on/off" commands.
  <https://sourceware.org/ml/gdb-patches/2014-04/msg00006.html>

the "qXfer" packets where missed.  This commit fixes that.

I've changed remote_search_memory too for consistency (seems like
those are the last direct references to packet->support), though the
difference is not observable because the qSearch:memory packet is auto
probed.  Note gdb.base/find-unmapped.exp already exercises explicit
"set remote search-memory-packet off".

gdb/ChangeLog:
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.

gdb/testsuite/ChangeLog:
2017-12-06  Pedro Alves  <palves@redhat.com>

* gdb.arch/i386-avx.exp: If testing with a RSP target, check
force-disabling XML descriptions.
--

 gdb/remote.c                        |   16 +++++++++-------
 gdb/testsuite/gdb.arch/i386-avx.exp |   25 +++++++++++++++++++++++++
 2 files changed, 34 insertions(+), 7 deletions(-)
gdb/ChangeLog
gdb/remote.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.arch/i386-avx.exp