From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ull4i-0001Cb-Lm for qemu-devel@nongnu.org; Sun, 09 Jun 2013 15:14:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ull4g-0000rw-SU for qemu-devel@nongnu.org; Sun, 09 Jun 2013 15:14:48 -0400 Received: from cantor2.suse.de ([195.135.220.15]:44469 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ull4g-0000rb-At for qemu-devel@nongnu.org; Sun, 09 Jun 2013 15:14:46 -0400 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E55FCA398F for ; Sun, 9 Jun 2013 21:14:45 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 9 Jun 2013 21:13:20 +0200 Message-Id: <1370805206-26574-54-git-send-email-afaerber@suse.de> In-Reply-To: <1370805206-26574-1-git-send-email-afaerber@suse.de> References: <1370805206-26574-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH qom-cpu 53/59] gdbstub: Abstract gdb_breakpoint_remove_all() with qemu_for_each_cpu() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= Signed-off-by: Andreas F=C3=A4rber --- 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 add= r, target_ulong len, int type) } } =20 -static void gdb_breakpoint_remove_all(void) +static void gdb_breakpoint_remove_all_one(CPUState *cpu, void *data) { - CPUArchState *env; + CPUArchState *env =3D cpu->env_ptr; + + cpu_breakpoint_remove_all(env, BP_GDB); +#ifndef CONFIG_USER_ONLY + cpu_watchpoint_remove_all(env, BP_GDB); +#endif +} =20 +static void gdb_breakpoint_remove_all(void) +{ if (kvm_enabled()) { kvm_remove_all_breakpoints(ENV_GET_CPU(gdbserver_state->c_cpu)); return; } =20 - for (env =3D first_cpu; env !=3D NULL; env =3D 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); } =20 static void gdb_set_cpu_pc(GDBState *s, target_ulong pc) --=20 1.8.1.4