diff mbox

[2/3] cpu: Initialize breakpoint/watchpoint lists on cpu_common_initfn()

Message ID 1430164833-21006-3-git-send-email-ehabkost@redhat.com
State New
Headers show

Commit Message

Eduardo Habkost April 27, 2015, 8 p.m. UTC
One small step in the simplification of cpu_exec_init().

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 exec.c    | 2 --
 qom/cpu.c | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/exec.c b/exec.c
index 3566d8f..8d5d844 100644
--- a/exec.c
+++ b/exec.c
@@ -545,8 +545,6 @@  void cpu_exec_init(CPUArchState *env)
         cpu_index++;
     }
     cpu->cpu_index = cpu_index;
-    QTAILQ_INIT(&cpu->breakpoints);
-    QTAILQ_INIT(&cpu->watchpoints);
 #ifndef CONFIG_USER_ONLY
     cpu->as = &address_space_memory;
     cpu->thread_id = qemu_get_thread_id();
diff --git a/qom/cpu.c b/qom/cpu.c
index 108bfa2..56c53a8 100644
--- a/qom/cpu.c
+++ b/qom/cpu.c
@@ -313,6 +313,8 @@  static void cpu_common_initfn(Object *obj)
     CPUClass *cc = CPU_GET_CLASS(obj);
 
     cpu->gdb_num_regs = cpu->gdb_num_g_regs = cc->gdb_num_core_regs;
+    QTAILQ_INIT(&cpu->breakpoints);
+    QTAILQ_INIT(&cpu->watchpoints);
 }
 
 static int64_t cpu_common_get_arch_id(CPUState *cpu)