Skip to content

Commit

Permalink
gdb_main: document PacketSize GDB remote feature format
Browse files Browse the repository at this point in the history
  • Loading branch information
perigoso committed Dec 13, 2024
1 parent 568df9a commit 8bcdc48
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/gdb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,12 @@ static void exec_q_supported(const char *packet, const size_t length)
*/
gdb_set_noackmode(false);

gdb_putpacket_str_f("PacketSize=%X;qXfer:memory-map:read+;qXfer:features:read+;"
/*
* The Remote Protocol documentation is not clear on what format the PacketSize feature should be in,
* according to the GDB source code (as of version 15.2) it should be a hexadecimal encoded number
* to be parsed by strtoul() with a base of 16.
*/
gdb_putpacket_str_f("PacketSize=%x;qXfer:memory-map:read+;qXfer:features:read+;"
"vContSupported+" GDB_QSUPPORTED_NOACKMODE,
GDB_PACKET_BUFFER_SIZE);
}
Expand Down

0 comments on commit 8bcdc48

Please sign in to comment.