[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 21/21] gdbstub: init mon_chr through qemu_chr_alloc
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 21/21] gdbstub: init mon_chr through qemu_chr_alloc |
Date: |
Fri, 12 Sep 2014 15:58:58 +0200 |
From: Pavel Dovgalyuk <address@hidden>
This patch initializes monitor for gdbstub with the qemu_chr_alloc function
instead of just allocating the memory. Initialization function call
is required, because it also creates chr_write_lock mutex, which is used
when writing to this character device.
Signed-off-by: Pavel Dovgalyuk <address@hidden>
Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>
---
gdbstub.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdbstub.c b/gdbstub.c
index 8afe0b7..71aaa23 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -1707,7 +1707,7 @@ int gdbserver_start(const char *device)
qemu_add_vm_change_state_handler(gdb_vm_state_change, NULL);
/* Initialize a monitor terminal for gdb */
- mon_chr = g_malloc0(sizeof(*mon_chr));
+ mon_chr = qemu_chr_alloc();
mon_chr->chr_write = gdb_monitor_write;
monitor_init(mon_chr, 0);
} else {
--
2.1.0
- [Qemu-devel] [PULL 05/21] rules.mak: Fix DSO build by pulling in archive symbols, (continued)
- [Qemu-devel] [PULL 05/21] rules.mak: Fix DSO build by pulling in archive symbols, Paolo Bonzini, 2014/09/12
- [Qemu-devel] [PULL 13/21] apic_common: vapic_paddr synchronization fix, Paolo Bonzini, 2014/09/12
- [Qemu-devel] [PULL 14/21] cpu: init vmstate for ticks and clock offset, Paolo Bonzini, 2014/09/12
- [Qemu-devel] [PULL 15/21] fdc: adding vmstate for save/restore, Paolo Bonzini, 2014/09/12
- [Qemu-devel] [PULL 12/21] vl: use QLIST_FOREACH_SAFE to visit change state handlers, Paolo Bonzini, 2014/09/12
- [Qemu-devel] [PULL 16/21] parallel: adding vmstate for save/restore, Paolo Bonzini, 2014/09/12
- [Qemu-devel] [PULL 17/21] serial: fixing vmstate for save/restore, Paolo Bonzini, 2014/09/12
- [Qemu-devel] [PULL 19/21] mc146818rtc: add missed field to vmstate, Paolo Bonzini, 2014/09/12
- [Qemu-devel] [PULL 18/21] piix: do not set irq while loading vmstate, Paolo Bonzini, 2014/09/12
- [Qemu-devel] [PULL 20/21] pckbd: adding new fields to vmstate, Paolo Bonzini, 2014/09/12
- [Qemu-devel] [PULL 21/21] gdbstub: init mon_chr through qemu_chr_alloc,
Paolo Bonzini <=
- Re: [Qemu-devel] [PULL 00/21] KVM, memory, build, migration changes for 2014-09-11, Peter Maydell, 2014/09/15