This is the mail archive of the gdb-patches@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]

[PATCH] Fix for QTro remote packet


In 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.


For gdb/ChangeLog:

2013-05-01  David Taylor  <dtaylor@emc.com>

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

Here's a one line patch to gdb/remote.c of gdb 7.6:

--- remote.c~	2013-04-12 12:04:50.000000000 -0400
+++ remote.c	2013-05-01 12:45:10.000000000 -0400
@@ -10652,6 +10652,7 @@
     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];

This is small enough that no copyright assignment should be needed, but
EMC has one on file.

David
--
David Taylor
dtaylor@emc.com


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