summaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-rw-r--r--src/server/gdb_server.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index 7c28dc08..c2c18baf 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -1850,11 +1850,14 @@ static void gdb_log_callback(void *priv, const char *file, int line,
gdb_output_con(connection, string);
}
+/* Do not allocate this on the stack */
+char gdb_packet_buffer[GDB_BUFFER_SIZE];
+
int gdb_input_inner(connection_t *connection)
{
gdb_service_t *gdb_service = connection->service->priv;
target_t *target = gdb_service->target;
- char packet[GDB_BUFFER_SIZE];
+ char *packet=gdb_packet_buffer;
int packet_size;
int retval;
gdb_connection_t *gdb_con = connection->priv;