diff options
author | Pedro Alves <palves@redhat.com> | 2013-05-10 13:59:45 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2013-05-10 13:59:45 +0000 |
commit | 2b6f779f35f31109cd1fa7e847153d463f1b21ba (patch) | |
tree | 15a815c4df0347d26014be92a12678d1068f9aad /gdb/remote.c | |
parent | 4ab6caae50b7dd03fdd35f9b63f74323098d1d1a (diff) | |
download | gdb-2b6f779f35f31109cd1fa7e847153d463f1b21ba.tar.gz |
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.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r-- | gdb/remote.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index e1c63adf899..b7a7cf649b9 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -10667,6 +10667,7 @@ remote_trace_set_readonly_regions (void) return; /* No information to give. */ strcpy (target_buf, "QTro"); + offset = strlen (target_buf); for (s = exec_bfd->sections; s; s = s->next) { char tmp1[40], tmp2[40]; |