From nobody Mon Nov 10 12:51:08 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1556199815; cv=none; d=zoho.com; s=zohoarc; b=dp5Xe3J7Wac7GovzdpkUzClvjkEJGL6d/NIUrUdSB3qD3hWoX5yyEJyCwyLB1tK23jQOV3b1b37MRd5MBlLIKkEv8LvJVhmBby8Jc5D1nqXqxVqsrX79WnD6CrHy+uZglCJ0hKZtgdmSLzMtvZNhA5ecNsp+2G6GO9+Wl9W0XzU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556199815; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=bTkKvUXe+vJFlObggYTIw/quvUXexqXsMjWKRIC3GfM=; b=J2f8rytwls82TgQfrXO8AVG9YgoP5cwVNBtJlg9KbCptzEJog20B8iEyhNIINMN+flAN3PG4qZt1pLTTrexcvAsWMTiX6rwB9pskzV8lgObPj7BCvHFGtwkJvxuIc6XHNw0Goth5VYi2/heyCGlLUogzqaibrFcfnJsEHmh0Xtk= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1556199815742381.9995774454717; Thu, 25 Apr 2019 06:43:35 -0700 (PDT) Received: from localhost ([127.0.0.1]:57416 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJeex-00048s-Mf for importer@patchew.org; Thu, 25 Apr 2019 09:43:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJePJ-0007zQ-5v for qemu-devel@nongnu.org; Thu, 25 Apr 2019 09:27:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJePI-0000Th-8W for qemu-devel@nongnu.org; Thu, 25 Apr 2019 09:27:21 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:50607) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hJePI-0000SK-2H for qemu-devel@nongnu.org; Thu, 25 Apr 2019 09:27:20 -0400 Received: by mail-wm1-x344.google.com with SMTP id 10so9372350wmk.0 for ; Thu, 25 Apr 2019 06:27:19 -0700 (PDT) Received: from localhost.localdomain (bzq-79-178-247-46.red.bezeqint.net. [79.178.247.46]) by smtp.gmail.com with ESMTPSA id y4sm2316540wrt.34.2019.04.25.06.27.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Apr 2019 06:27:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bTkKvUXe+vJFlObggYTIw/quvUXexqXsMjWKRIC3GfM=; b=ihhUK6RDAZh4WQ3g4tUu3L3Tybx9rZXQNXTEmVJQEWKAK6nFJhsA/K3dyPkLqgcGng RCkxVjZF0YL7HvfBnuq8rsUtDpRLqtHWkoioRBJpDvtOqVSPxoq5X5YGwK4qFwXtUlfu X44WpfH8lNwQoYL+q9MnFaCVL4lhHpeFGjozYcENMXH2PbBo0aZOOMPAdr7/TpzP+BRY KGQB5RPoT1KM4YG8s9TZGCls76tzeLe8n/Aw+PJiYK56s1+Yx86WcSmsvh8Ia5nN/AEa JnvYEsmiZmeHJghcl+62brO12jNvILihIF/U6THmNFwxmXz/9eyvx1KDiTEH2zUchBDq sPow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bTkKvUXe+vJFlObggYTIw/quvUXexqXsMjWKRIC3GfM=; b=t0PyPUCPkhTvIvmb8X3KaFDiwIRacNH+9fBLejRuDSWDpc55Y4uC0kZ1w738nKNyat KUD4w8zGq9LeJJVqBIqPjNLq7cAgNdrDJmziuU2MXTsSSYCIaKxPHWyWj0OtFYW24dm7 zcP64y47hAoNLk5Uh/1YrfDG7HjD5p3RYsq7HSZqOm6MCElM9CXKs2UdI5fmy2T+8Ial +gLpf6w0KbrjhRJFGhdl9a96FkY3gCEzw7XwsknMekAF1mJvai0ZhSA/qHvbFLyi5VSl Ya8OvOqXUnMJRXgJKiw0tlzK5MnmDZ1VykZOQtlDeWgXq8fH0rSQKRKhBrsfMGanYchD iZwg== X-Gm-Message-State: APjAAAUi+Wo3htx3+UnPkcklpP231bAQJ4jKVDIzYh3z9DMKWFPgsCgP 3MPH3zFpnx8eS35eubUnrcfcuOXM X-Google-Smtp-Source: APXvYqx54OANFaYbvbhubYcRgl8dZf9EHKn68dDldF3z8WWLWjLIKPk55DvZUzRgy2JAWzXNceN+jQ== X-Received: by 2002:a1c:c7c9:: with SMTP id x192mr3610756wmf.151.1556198837806; Thu, 25 Apr 2019 06:27:17 -0700 (PDT) From: Jon Doron To: qemu-devel@nongnu.org Date: Thu, 25 Apr 2019 16:26:19 +0300 Message-Id: <20190425132636.31636-5-arilou@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190425132636.31636-1-arilou@gmail.com> References: <20190425132636.31636-1-arilou@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 Subject: [Qemu-devel] [PATCH v6 04/21] gdbstub: Implement continue (c pkt) with new infra X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jon Doron Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jon Doron --- gdbstub.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 29ca6be3df..a38f9d4ef9 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1523,6 +1523,16 @@ static void handle_thread_alive(GdbCmdContext *gdb_c= tx, void *user_ctx) put_packet(gdb_ctx->s, "OK"); } =20 +static void handle_continue(GdbCmdContext *gdb_ctx, void *user_ctx) +{ + if (gdb_ctx->num_params) { + gdb_set_cpu_pc(gdb_ctx->s, gdb_ctx->params[0].val_ull); + } + + gdb_ctx->s->signal =3D 0; + gdb_continue(gdb_ctx->s); +} + static int gdb_handle_packet(GDBState *s, const char *line_buf) { CPUState *cpu; @@ -1559,13 +1569,16 @@ static int gdb_handle_packet(GDBState *s, const cha= r *line_buf) gdb_breakpoint_remove_all(); break; case 'c': - if (*p !=3D '\0') { - addr =3D strtoull(p, (char **)&p, 16); - gdb_set_cpu_pc(s, addr); + { + static const GdbCmdParseEntry continue_cmd_desc =3D { + .handler =3D handle_continue, + .cmd =3D "c", + .cmd_startswith =3D 1, + .schema =3D "L0" + }; + cmd_parser =3D &continue_cmd_desc; } - s->signal =3D 0; - gdb_continue(s); - return RS_IDLE; + break; case 'C': s->signal =3D gdb_signal_to_target (strtoul(p, (char **)&p, 16)); if (s->signal =3D=3D -1) --=20 2.20.1