This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb and binutils branch master updated. ca4f7f8bebc069b8beec58754dc721e9be0798c7


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, master has been updated
       via  ca4f7f8bebc069b8beec58754dc721e9be0798c7 (commit)
      from  11903c4c65d3bf0391362ac389b96ffdd9f58212 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ca4f7f8bebc069b8beec58754dc721e9be0798c7

commit ca4f7f8bebc069b8beec58754dc721e9be0798c7
Author: Pedro Alves <palves@redhat.com>
Date:   Tue Apr 29 14:01:27 2014 +0100

    Fix remote connection to targets that don't support the QNonStop packet.
    
    ... and others.  The recent patch that fixed several "set remote
    foo-packet on/off" commands introduced a regression, observable when
    connecting GDB to QEMU.  For instance:
    
            (gdb) set debug remote 1
            (gdb) tar rem :4444
            Remote debugging using :4444
            Sending packet: $qSupported:multiprocess+;qRelocInsn+#2a...Ack
            Packet received: PacketSize=1000;qXfer:features:read+
            Packet qSupported (supported-packets) is supported
            Sending packet: $Hgp0.0#ad...Ack
            Packet received: OK
            Sending packet: $qXfer:features:read:target.xml:0,ffb#79...Ack
            Packet received: [...]
            Sending packet: $qXfer:features:read:arm-core.xml:0,ffb#08...Ack
            Packet received: [...]
     !!! -> Sending packet: $QNonStop:0#8c...Ack
            Packet received:
            Remote refused setting all-stop mode with:
    
    The "QNonStop" feature is associated with the PACKET_QNonStop packet,
    with a default of PACKET_DISABLE, so GDB should not be sending the
    packet at all.
    
    The patch that introduced the regression decoupled packet_config's
    'detect' and 'support' fields, making the former (an auto_boolean)
    purely the associated "set remote foo-packet" command's variable.  In
    the example above, the packet config's 'supported' field does end up
    correctly set to PACKET_DISABLE.  However, nothing is presently
    initializing packet configs that don't actually have a command
    associated.  Those configs's 'detect' field then ends up set to
    AUTO_BOOLEAN_TRUE, simply because that happens to be 0.  This forces
    GDB to assume the packet is supported, irrespective of what the target
    claims it supports, just like if the user had done "set remote
    foo-packet on" (this being the associated command, if there was one).
    
    Ideally, all packet configs would have a command associated.  While
    that isn't true, make sure all packet configs are initialized, even if
    no command is associated, and add an assertion that prevents adding
    more packets/features without an associated command.
    
    Tested on x86_64 Fedora 17, against pristine gdbserver, and against a
    gdbserver with the QNonStop packet/feature disabled with a local hack.
    
    gdb/
    2014-04-29  Pedro Alves  <palves@redhat.com>
    
    	* remote.c (struct packet_config) <detect>: Extend comment.
    	(add_packet_config_cmd): Don't set the config's detect or support
    	fields here.
    	(init_all_packet_configs): Also initialize the config's 'detect'
    	field.
    	(reset_all_packet_configs_support): New function.
    	(remote_open_1): Call reset_all_packet_configs_support instead of
    	init_all_packet_configs.
    	(_initialize_remote): Initialize all packet configs.  Assert that
    	all packets have an associated command, except a few known
    	outliers.

-----------------------------------------------------------------------

Summary of changes:
 gdb/ChangeLog |   14 +++++++++++++
 gdb/remote.c  |   60 +++++++++++++++++++++++++++++++++++++++++++++++++++-----
 2 files changed, 68 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
gdb and binutils


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]