]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/remote.c
PR remote/15455 - QTro remote packet broken
authorPedro Alves <palves@redhat.com>
Fri, 10 May 2013 13:59:45 +0000 (13:59 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 10 May 2013 13:59:45 +0000 (13:59 +0000)
commit9779ab84ac97a6bcec8c454959f10940c9a28f05
tree87370196fe5073219d3e1b55daae89361fabd98f
parentab1c4e88612fb125c21eaa4374093161bb18fd10
PR remote/15455 - QTro remote packet broken

In the function remote_trace_set_readonly_regions in gdb/remote.c, the
local variable 'offset' does not account for "QTro" at the start of
the packet with the result that if there are any read-only regions,
the packet is sent -- but without the "QTro" -- causing the remote
stub to report that the packet is unsupported:

  Sending packet: $:0000000000400200,(...),00000000004560a4#ab...Packet received:

vs the expected:

  Sending packet: $QTro:0000000000400200,(...),00000000004560a4#31...Packet received: OK

We don't see the problem when testing with GDBserver, as that supports
qXfer:trace-frame-info:read, meaning GDBserver never needs to read
from the read-only sections directly itself.  This commit adds a test
that explicitly disables qXfer:trace-frame-info:read.

gdb/
2013-05-10  David Taylor  <dtaylor@emc.com>

PR remote/15455

* remote.c (remote_trace_set_readonly_regions): Do not overwrite
"QTro" at start of packet.

gdb/testsuite/
2013-05-10  Pedro Alves  <palves@redhat.com>

PR remote/15455

* gdb.trace/qtro.c: New file.
* gdb.trace/qtro.exp: New file.
gdb/ChangeLog
gdb/remote.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.trace/qtro.c [new file with mode: 0644]
gdb/testsuite/gdb.trace/qtro.exp [new file with mode: 0644]