gdb_server: set current_target from connection's one
[openocd.git] / src / server / gdb_server.c
index f0b552d..2270aff 100644 (file)
@@ -936,6 +936,7 @@ static int gdb_new_connection(struct connection *connection)
 
        target = get_target_from_connection(connection);
        connection->priv = gdb_connection;
+       connection->cmd_ctx->current_target = target;
 
        /* initialize gdb connection information */
        gdb_connection->buf_p = gdb_connection->buffer;