[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH qom-cpu 53/59] gdbstub: Abstract gdb_breakpoint_remo
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PATCH qom-cpu 53/59] gdbstub: Abstract gdb_breakpoint_remove_all() with qemu_for_each_cpu() |
Date: |
Sun, 9 Jun 2013 21:13:20 +0200 |
Signed-off-by: Andreas Färber <address@hidden>
---
gdbstub.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/gdbstub.c b/gdbstub.c
index eb47068..9400abd 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -2059,21 +2059,24 @@ static int gdb_breakpoint_remove(target_ulong addr,
target_ulong len, int type)
}
}
-static void gdb_breakpoint_remove_all(void)
+static void gdb_breakpoint_remove_all_one(CPUState *cpu, void *data)
{
- CPUArchState *env;
+ CPUArchState *env = cpu->env_ptr;
+
+ cpu_breakpoint_remove_all(env, BP_GDB);
+#ifndef CONFIG_USER_ONLY
+ cpu_watchpoint_remove_all(env, BP_GDB);
+#endif
+}
+static void gdb_breakpoint_remove_all(void)
+{
if (kvm_enabled()) {
kvm_remove_all_breakpoints(ENV_GET_CPU(gdbserver_state->c_cpu));
return;
}
- for (env = first_cpu; env != NULL; env = env->next_cpu) {
- cpu_breakpoint_remove_all(env, BP_GDB);
-#ifndef CONFIG_USER_ONLY
- cpu_watchpoint_remove_all(env, BP_GDB);
-#endif
- }
+ qemu_for_each_cpu(gdb_breakpoint_remove_all_one, NULL);
}
static void gdb_set_cpu_pc(GDBState *s, target_ulong pc)
--
1.8.1.4
- [Qemu-devel] [PATCH qom-cpu 46/59] ppc: Abstract ppce500_set_mpic_proxy() with qemu_for_each_cpu(), (continued)
- [Qemu-devel] [PATCH qom-cpu 49/59] cpus: Abstract all_vcpus_paused() with qemu_for_each_cpu(), Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 50/59] cpus: Abstract qmp_query_cpus() with qemu_for_each_cpu(), Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 51/59] exec: Abstract qemu_get_cpu() with qemu_for_each_cpu(), Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 52/59] gdbstub: Abstract gdb_breakpoint_{insert, remove}() with qemu_for_each_cpu(), Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 53/59] gdbstub: Abstract gdb_breakpoint_remove_all() with qemu_for_each_cpu(),
Andreas Färber <=
- [Qemu-devel] [PATCH qom-cpu 55/59] spapr_rtas: Abstract rtas_query_cpu_stopped_state() with qemu_get_cpu(), Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 56/59] spapr_rtas: Abstract rtas_start_cpu() with qemu_get_cpu(), Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 54/59] spapr: Abstract spapr_create_fdt_skel() with qemu_for_each_cpu(), Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 58/59] linux-user: Change thread_env to CPUState, Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 57/59] cpu: Make first_cpu and next_cpu CPUState (WIP), Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 59/59] bsd-user: Change thread_env to CPUState, Andreas Färber, 2013/06/09
- Re: [Qemu-devel] [PATCH qom-cpu 00/59] QOM CPUState, part 10: CPU loops, Stefano Stabellini, 2013/06/10