From 388e6732852c3be128af601901447980dfc526b7 Mon Sep 17 00:00:00 2001 From: Philippe Waroquiers Date: Tue, 28 Jan 2025 15:33:15 +0100 Subject: [PATCH] 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. --- coregrind/m_gdbserver/server.c | 2 ++ 1 file changed, 2 insertions(+) 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+"); -- 2.47.2