From patchwork Thu Nov 15 00:11:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 199095 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 18D8B2C0081 for ; Thu, 15 Nov 2012 12:26:43 +1100 (EST) Received: from localhost ([::1]:42608 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYoE5-0004mi-7e for incoming@patchwork.ozlabs.org; Wed, 14 Nov 2012 20:26:41 -0500 Received: from eggs.gnu.org ([208.118.235.92]:33137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYoDw-0004m6-5L for qemu-devel@nongnu.org; Wed, 14 Nov 2012 20:26:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYoDt-0002Zd-0G for qemu-devel@nongnu.org; Wed, 14 Nov 2012 20:26:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:26318) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYoDs-0002ZX-P1 for qemu-devel@nongnu.org; Wed, 14 Nov 2012 20:26:28 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAF1Q0Ta014673 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 14 Nov 2012 20:26:28 -0500 Received: from amt.cnet (vpn1-5-41.gru2.redhat.com [10.97.5.41]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qAF0Ck2e004783; Wed, 14 Nov 2012 19:12:47 -0500 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 3A27166E17D; Wed, 14 Nov 2012 22:12:22 -0200 (BRST) Received: (from marcelo@localhost) by amt.cnet (8.14.5/8.14.5/Submit) id qAF0CLxI002961; Wed, 14 Nov 2012 22:12:21 -0200 From: Marcelo Tosatti To: Anthony Liguori Date: Wed, 14 Nov 2012 22:11:46 -0200 Message-Id: <78021d6d8dc50ed4d67442c3ca11eab78220e9ef.1352938305.git.mtosatti@redhat.com> In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Jan Kiszka , Marcelo Tosatti , qemu-devel@nongnu.org, kvm@vger.kernel.org Subject: [Qemu-devel] [PATCH 2/2] kvm: Actually remove software breakpoints from list on cleanup X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Jan Kiszka So far we only removed them from the guest, leaving its states in the list. This made it impossible for gdb to re-enable breakpoints on the same address after re-attaching. Signed-off-by: Jan Kiszka Signed-off-by: Marcelo Tosatti --- kvm-all.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index b6d0483..3bc3347 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1905,6 +1905,8 @@ void kvm_remove_all_breakpoints(CPUArchState *current_env) } } } + QTAILQ_REMOVE(&s->kvm_sw_breakpoints, bp, entry); + g_free(bp); } kvm_arch_remove_all_hw_breakpoints();