gdbstub: fix memory binary upload on latest GDB

GDB release 16.2 recently to fix the incompatibility issue with LLDB.
For us, the only change is stub must report it support feature 'binary-upload' before GDB will use this feature.
For more information, find bug report and discussion in https://sourceware.org/bugzilla/show_bug.cgi?id=32593

Use GDB 16.2, now it works with binary upload.
```
  [remote] Sending packet: $x39c,4#a7
  [remote] Received Ack
  [remote] Packet received: b\000\203
```

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
This commit is contained in:
Neo Xu 2025-02-05 11:29:28 +08:00 committed by archer
parent ac0ba3f413
commit 28cf56ce4f

View file

@ -1387,11 +1387,11 @@ static int gdb_query(FAR struct gdb_state_s *state)
{
#ifdef CONFIG_ARCH_HAVE_DEBUG
state->pkt_len = sprintf(state->pkt_buf,
"hwbreak+;PacketSize=%zx",
"binary-upload+;hwbreak+;PacketSize=%zx",
sizeof(state->pkt_buf));
#else
state->pkt_len = sprintf(state->pkt_buf,
"PacketSize=%zx",
"binary-upload+;PacketSize=%zx",
sizeof(state->pkt_buf));
#endif
gdb_send_packet(state);