gdbstub:expand buffer size to increase transfer speed

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
anjiahao 2024-09-05 14:29:36 +08:00 committed by Xiang Xiao
parent e0bcad3a1d
commit 5817f6153d
2 changed files with 9 additions and 1 deletions

View file

@ -17,4 +17,10 @@ config LIB_GDBSTUB_DEBUG
---help---
Add debug info to gdbstub
config LIB_GDBSTUB_PKTSIZE
int "Gdbstub packet size"
default 32768
---help---
The size of the gdbstub packet buffer.
endif

View file

@ -50,6 +50,8 @@
# define GDB_ASSERT() do {} while (0)
#endif
#define BUFSIZE CONFIG_LIB_GDBSTUB_PKTSIZE
/****************************************************************************
* Private Types
****************************************************************************/
@ -66,7 +68,7 @@ struct gdb_state_s
FAR void *last_stopaddr; /* Last stop address */
pid_t pid; /* Gdb current thread */
FAR char *pkt_next; /* Pointer to next byte in packet */
char pkt_buf[1024]; /* Packet buffer */
char pkt_buf[BUFSIZE]; /* Packet buffer */
size_t pkt_len; /* Packet send and receive length */
uint8_t running_regs[XCPTCONTEXT_SIZE]; /* Registers of running thread */
size_t size; /* Size of registers */