From: Philippe Waroquiers Date: Tue, 28 Jan 2025 14:33:15 +0000 (+0100) Subject: Let gdbserver the support of 'x' packet by adding binary-upload+ in qSupported. X-Git-Tag: VALGRIND_3_25_0~158 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=388e6732852c3be128af601901447980dfc526b7;p=thirdparty%2Fvalgrind.git Let gdbserver the support of 'x' packet by adding binary-upload+ in qSupported. 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. --- diff --git a/coregrind/m_gdbserver/server.c b/coregrind/m_gdbserver/server.c index 939b7f293..410ebf3bc 100644 --- a/coregrind/m_gdbserver/server.c +++ b/coregrind/m_gdbserver/server.c @@ -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+");