]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Let gdbserver the support of 'x' packet by adding binary-upload+ in qSupported.
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Tue, 28 Jan 2025 14:33:15 +0000 (15:33 +0100)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Tue, 28 Jan 2025 14:43:57 +0000 (15:43 +0100)
Following the incompatible implementation of the 'x' packet between
lldb and gdb, gdb now only uses the x packet if the gdbserver
reports binary-upload+ in qSupported.

Tested with gdb 16.1, gdb 16 branch and gdb 17 trunk, each time checking
the 'x' packet was effectively used.

coregrind/m_gdbserver/server.c

index 939b7f29319a5ca2eb088e107e4305d19c0ada5e..410ebf3bc3e84a1f810815d1f60f2d4e1c9de86a 100644 (file)
@@ -1126,6 +1126,8 @@ void handle_query (char *arg_own_buf, int *new_packet_len_p)
       /* Note: max packet size including frame and checksum, but without
          trailing null byte, which is not sent/received. */
 
+      strcat (arg_own_buf, ";binary-upload+");
+
       strcat (arg_own_buf, ";QStartNoAckMode+");
       strcat (arg_own_buf, ";QPassSignals+");
       strcat (arg_own_buf, ";QCatchSyscalls+");