From 7267c0947d7e8ae5dff7bafd932c3bc285f43e5c Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Sat, 20 Aug 2011 22:09:37 -0500 Subject: Use glib memory allocation and free functions qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori --- gdbstub.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gdbstub.c') diff --git a/gdbstub.c b/gdbstub.c index 27b0cfa81d..2f0206d188 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1668,7 +1668,7 @@ void gdb_register_coprocessor(CPUState * env, GDBRegisterState **p; static int last_reg = NUM_CORE_REGS; - s = (GDBRegisterState *)qemu_mallocz(sizeof(GDBRegisterState)); + s = (GDBRegisterState *)g_malloc0(sizeof(GDBRegisterState)); s->base_reg = last_reg; s->num_regs = num_regs; s->get_reg = get_reg; @@ -2606,7 +2606,7 @@ static void gdb_accept(void) val = 1; setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&val, sizeof(val)); - s = qemu_mallocz(sizeof(GDBState)); + s = g_malloc0(sizeof(GDBState)); s->c_cpu = first_cpu; s->g_cpu = first_cpu; s->fd = fd; @@ -2774,13 +2774,13 @@ int gdbserver_start(const char *device) s = gdbserver_state; if (!s) { - s = qemu_mallocz(sizeof(GDBState)); + s = g_malloc0(sizeof(GDBState)); gdbserver_state = s; qemu_add_vm_change_state_handler(gdb_vm_state_change, NULL); /* Initialize a monitor terminal for gdb */ - mon_chr = qemu_mallocz(sizeof(*mon_chr)); + mon_chr = g_malloc0(sizeof(*mon_chr)); mon_chr->chr_write = gdb_monitor_write; monitor_init(mon_chr, 0); } else { -- cgit v1.2.3