static void put_buffer(GDBState *s, const uint8_t *buf, int len)

{

#ifdef CONFIG_USER_ONLY

    int ret;



    while (len > 0) {

        ret = send(s->fd, buf, len, 0);

        if (ret < 0) {

            if (errno != EINTR && errno != EAGAIN)

                return;

        } else {

            buf += ret;

            len -= ret;

        }

    }

#else

    qemu_chr_fe_write(s->chr, buf, len);

#endif

}

static void put_buffer(GDBState *s, const uint8_t *buf, int len)

{

#ifdef CONFIG_USER_ONLY

    int ret;



    while (len > 0) {

        ret = send(s->fd, buf, len, 0);

        if (ret < 0) {

            if (errno != EINTR && errno != EAGAIN)

                return;

        } else {

            buf += ret;

            len -= ret;

        }

    }

#else

    qemu_chr_fe_write(s->chr, buf, len);

#endif

}

static void FUNC_0(GDBState *VAR_0, const uint8_t *VAR_1, int VAR_2)

{

#ifdef CONFIG_USER_ONLY

    int ret;



    while (VAR_2 > 0) {

        ret = send(VAR_0->fd, VAR_1, VAR_2, 0);

        if (ret < 0) {

            if (errno != EINTR && errno != EAGAIN)

                return;

        } else {

            VAR_1 += ret;

            VAR_2 -= ret;

        }

    }

#else

    qemu_chr_fe_write(VAR_0->chr, VAR_1, VAR_2);

#endif

}

static void FUNC_0(GDBState *VAR_0, const uint8_t *VAR_1, int VAR_2)
{ #ifdef CONFIG_USER_ONLY
int ret; while (VAR_2 > 0) { ret = send(VAR_0->fd, VAR_1, VAR_2, 0); if (ret < 0) { if (errno != EINTR && errno != EAGAIN)
return; } else { VAR_1 += ret; VAR_2 -= ret; } } #else
qemu_chr_fe_write(VAR_0->chr, VAR_1, VAR_2); #endif
}