From patchwork Mon Nov 12 14:04:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 198404 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 F241D2C0087 for ; Tue, 13 Nov 2012 01:46:31 +1100 (EST) Received: from localhost ([::1]:54562 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXud8-00008R-BS for incoming@patchwork.ozlabs.org; Mon, 12 Nov 2012 09:04:50 -0500 Received: from eggs.gnu.org ([208.118.235.92]:32836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXud0-0008Na-Gj for qemu-devel@nongnu.org; Mon, 12 Nov 2012 09:04:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TXucx-00071u-8R for qemu-devel@nongnu.org; Mon, 12 Nov 2012 09:04:42 -0500 Received: from david.siemens.de ([192.35.17.14]:23189) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXucw-00071R-Uw; Mon, 12 Nov 2012 09:04:39 -0500 Received: from mail1.siemens.de (localhost [127.0.0.1]) by david.siemens.de (8.13.6/8.13.6) with ESMTP id qACE4ZhF009608; Mon, 12 Nov 2012 15:04:35 +0100 Received: from mchn199C.mchp.siemens.de ([139.25.109.49]) by mail1.siemens.de (8.13.6/8.13.6) with ESMTP id qACE4ZkS019670; Mon, 12 Nov 2012 15:04:35 +0100 Message-ID: <50A101F3.9040908@siemens.com> Date: Mon, 12 Nov 2012 15:04:35 +0100 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Avi Kivity , Marcelo Tosatti X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 192.35.17.14 Cc: qemu-devel , qemu-stable Subject: [Qemu-devel] [PATCH] 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 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 --- 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();