From patchwork Thu May 30 11:20:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 247545 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 C84692C0092 for ; Thu, 30 May 2013 21:21:15 +1000 (EST) Received: from localhost ([::1]:52312 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ui0uw-0005tO-0K for incoming@patchwork.ozlabs.org; Thu, 30 May 2013 07:21:14 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ui0uc-0005ro-Ec for qemu-devel@nongnu.org; Thu, 30 May 2013 07:20:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ui0uV-0006zW-Ig for qemu-devel@nongnu.org; Thu, 30 May 2013 07:20:54 -0400 Received: from mail-ea0-x22d.google.com ([2a00:1450:4013:c01::22d]:51863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ui0uV-0006zH-BG for qemu-devel@nongnu.org; Thu, 30 May 2013 07:20:47 -0400 Received: by mail-ea0-f173.google.com with SMTP id n15so151420ead.32 for ; Thu, 30 May 2013 04:20:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=0stAihcqMENG36obSe5pM6einLw7MG4PZW17gDtEnlI=; b=vyEToOrWN0BNLcLL7+fCQxn1aXgOAakqaRaIyqumCbiNdXnRd9d/z0M2QXRGfiZTcP 8fPIPhzee/pmyf+oGEo/TMPZ9YRD1YgMv5XUpTMpjVEduL85IauBCgv3M/DnTucoKvdW wzK2yvccFEZT6pqdu6RhOan8tUwuMABI7+bNQ+EMlMQmYC+J8e4cwXglE/qFD/UDz1Ul xk+2pIFOrkavHhLV6U+xxAwpL0uNrfRDiLBmfg34wWJBIETTE8CrCoESz2UAjtvsIqcl hARc5SO7axibZSkc8NM3lTOnDpt7OV8tVU/3wOmYFdwqD5DfPIJjb4cNldJuJ3STyGwC 3qSQ== X-Received: by 10.14.127.131 with SMTP id d3mr9435883eei.134.1369912846651; Thu, 30 May 2013 04:20:46 -0700 (PDT) Received: from playground.lan (net-37-116-217-184.cust.dsl.vodafone.it. [37.116.217.184]) by mx.google.com with ESMTPSA id l6sm59776634eef.12.2013.05.30.04.20.43 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 30 May 2013 04:20:44 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 30 May 2013 13:20:40 +0200 Message-Id: <1369912840-18577-1-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.1.4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::22d Cc: Jan Kiszka Subject: [Qemu-devel] [PATCH] gdbstub: do not restart crashed guest 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 If a guest has crashed with an internal error or similar, detaching gdb (or any other debugger action) should not restart it. Cc: Jan Kiszka Signed-off-by: Paolo Bonzini Reviewed-by: Laszlo Ersek --- gdbstub.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gdbstub.c b/gdbstub.c index e80e1d3..90e54cb 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -371,7 +371,9 @@ static inline void gdb_continue(GDBState *s) #ifdef CONFIG_USER_ONLY s->running_state = 1; #else - vm_start(); + if (runstate_check(RUN_STATE_DEBUG)) { + vm_start(); + } #endif }