From nobody Mon Feb 9 04:44:22 2026 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=1556255215; cv=none; d=zoho.com; s=zohoarc; b=MN8Ck1gAevnA6WcGIALYRFiXDAvOEPunD9QRWWNSEZE3yKr3fqh9bZm/lhE4jE5PvOLM3hEd+HM54ssisBxRBmqdLCOMOITr34TEXxo6c2qu2AuzDZQDr5NRwuZiPj1vIloZReWJ2YOSPVVHgrGRNMSQsjNwsl1n1iAwlU337XQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556255215; 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=9IF4rsqYBB5CcGAeM/Zis8CV+HM8l1BP4iU1qHaXB5E=; b=kY8RimwXYcmr/ifNoKi/BYKkyBNNF9QV7A4Hi3ghWlnx3QEnbCYeKR99Wd1CryarhZzj0M6eKvzmZHLVJuMci9pjhJLcZRjCR1L2Cj5vKXwEX8bCCoQ5YD+jELYdnvzox2/n+mnM3de20sVY+iX/R0IDSNAH6Sqz4zYN0iMmAQI= 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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 155625521548890.01295816771619; Thu, 25 Apr 2019 22:06:55 -0700 (PDT) Received: from localhost ([127.0.0.1]:39394 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJt4L-0002Av-BM for importer@patchew.org; Fri, 26 Apr 2019 01:06:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJsmm-0000dE-1d for qemu-devel@nongnu.org; Fri, 26 Apr 2019 00:48:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJsax-0004Ma-3v for qemu-devel@nongnu.org; Fri, 26 Apr 2019 00:36:20 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:35593) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hJsav-0004Fx-6v for qemu-devel@nongnu.org; Fri, 26 Apr 2019 00:36:18 -0400 Received: by mail-wm1-x342.google.com with SMTP id y197so2376291wmd.0 for ; Thu, 25 Apr 2019 21:36:15 -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 h5sm3467088wmf.38.2019.04.25.21.36.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Apr 2019 21:36:13 -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=9IF4rsqYBB5CcGAeM/Zis8CV+HM8l1BP4iU1qHaXB5E=; b=HLKvgcbYz5oBPXP2GpJ5HgTkUYRiZAg/mFOG7RjmjJcSr+ZHJCK7Bw4ohI57lQPO9N bPGcPJO0L0O/Fzd39NMxWQTvT954J0z6NjZrOjrX+EQOyIAHmNS4oj4m7yBlsuW1Mh8b G47styCjvpgzioz8hNLhS7qqZhJQRCgwJ5M5Q90dZz7DkeAk90OmXNmbz3/SeZkKcyIx 33ckdLYbmHoGUnieYXPylSgJw4AvbMbF1EoWEhkyOhz/+0kLhumDhKG6Iegyfc1q1Dar 0l03EuLJtfbzUES5P42U+vAlkpfv+TasV4tEuqxImDI8FOTZn6WFz/Unzss8b+pYSeIp 8tzA== 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=9IF4rsqYBB5CcGAeM/Zis8CV+HM8l1BP4iU1qHaXB5E=; b=BYC4orNQ9lph/jhLdFGs4J0QgXzHT+SmWqY8wlQS0g6KfSoAEx13eP3kYRmYGkuatS sNmK2LF4QBoFknFzdkJtddeg0j/Q1VJjqFl2tvVA1DSdPBndO5wLAf8D2ubxvKNmZ4vB iA/iLBiyJQ8TLcqBLeJoodCSYT8cGPNSKC5v00bX459eAXfyTUtJl5q2mKuL0Rz5IxjG NV8JtXRv6OUf6mrWPXBOfUcPDbOiCLpQ4qOA8Di4eyG0THH4y5aXGGPpsCyIret0Tiu1 nL9ZsZ1+A8ItNWKqsPjaDvrJQg5kvmZHsapN8bCNDzbjUKHQc3y42Uye7IwIJETcSlZ8 BhkQ== X-Gm-Message-State: APjAAAUEQ6nZP0KWbWE439429fFSrW2uYB/veoOtj9CE++gehVL3TMfd CyMdKN8PucnQSeY7p8/tde7ECBqb X-Google-Smtp-Source: APXvYqz8m2Sr6cGpDFTo6ikiMamPTXHa/khDgLP5rjt9APzij6a3FmxuNdU9CQ+0kLgH3VASc7joQA== X-Received: by 2002:a1c:6783:: with SMTP id b125mr5815868wmc.79.1556253374335; Thu, 25 Apr 2019 21:36:14 -0700 (PDT) From: Jon Doron To: qemu-devel@nongnu.org Date: Fri, 26 Apr 2019 07:35:41 +0300 Message-Id: <20190426043558.6888-5-arilou@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190426043558.6888-1-arilou@gmail.com> References: <20190426043558.6888-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::342 Subject: [Qemu-devel] [PATCH v7 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: alex.bennee@linaro.org, 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 c47ef7dd9c..89f1ab6524 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1522,6 +1522,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; @@ -1558,13 +1568,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