aboutsummaryrefslogtreecommitdiff
path: root/gdbstub.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-08-20 22:09:37 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-08-20 23:01:08 -0500
commit7267c0947d7e8ae5dff7bafd932c3bc285f43e5c (patch)
tree9aa05d6e05ed83e67bf014f6745a3081b8407dc5 /gdbstub.c
parent14015304b662e8f8ccce46c5a6927af6a14c510b (diff)
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'gdbstub.c')
-rw-r--r--gdbstub.c8
1 files changed, 4 insertions, 4 deletions
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 {