Message ID | 20211016181514.3165661-2-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:ac0:cd8c:0:0:0:0:0 with SMTP id d12csp130431imp; Sat, 16 Oct 2021 11:17:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLJl9Iwi7gZnp+/ObJB9eaS94RJ1KuJnuNXzDG09OOPaXK5cBa6oO7cIod/qzjVfSHlVJ3 X-Received: by 2002:a25:2a89:: with SMTP id q131mr20819573ybq.404.1634408234563; Sat, 16 Oct 2021 11:17:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634408234; cv=none; d=google.com; s=arc-20160816; b=rnjWnSrxQdDbtEqWGrWhp+8vUnvtIfcAQwW/UjFUEvDJcPF8UEOPJ+Vxa5L2dYWOdL 9IyfAYne1OViuYDHka/awFga50IeMImaSiATX5kXXcrW7Ju24hmzEPevO0rjNFIBCksO C47j0i2ZjgWxcMnE9YDKHDtI3VI53tawwNeghlUV+bLdw1MRVUdjh4MPDar/EXHor01v zXlbsNGP6g05xz0fKKDktC2O7kcv+j6qZfFX96w9kOrby/eLLx+m3kQ8DiqdvCGO5Crf EMH9FHZyqRP906SsGaGX9V+cX18UI14NhlGwr+J51aDHXf9BSsaJmMunK4HxDwtvsIYG ispQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=q7mA/5NMDye+T6oTs6PprYj8IGolC1UqhFN/enpkEuI=; b=ANdnazK8Jm3dKOWMRooKumViSf4JUG1Lm1pUeCUSpgvJn2ZtIRgRUodd8lMbzjJPlE JHsWXttgCJnru7QAQEYjeCOzlWvr1vSl1ZMkbSHcxoKuRTOn9LEB5rcjRsuP8j+PCobi GGos4qskmFl2zw106vtHi5/mIlkgzNMHuOYDgc7OoBTIZkKzgyVD06l8P8T9I521nKoP xsjSLFpST+F3TH99/jm1cpD65CMBvzIadocQGV2iig8J2b2xym3w3/1vg6rJV+6t4HrC LkwOztSK4KdgfyG8mzupapnlN4cp9DwyESrolUDixfQIQiyYnjVEs9t8Nt/eK7mGvI5Y udyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CYRRM+1Z; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x1si9511055ybp.327.2021.10.16.11.17.14 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 16 Oct 2021 11:17:14 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CYRRM+1Z; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:50704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1mboF8-0008KT-0e for patch@linaro.org; Sat, 16 Oct 2021 14:17:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1mboDK-0008IX-AF for qemu-devel@nongnu.org; Sat, 16 Oct 2021 14:15:22 -0400 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:55212) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1mboDH-0001oB-D7 for qemu-devel@nongnu.org; Sat, 16 Oct 2021 14:15:21 -0400 Received: by mail-pj1-x1032.google.com with SMTP id np13so9464927pjb.4 for <qemu-devel@nongnu.org>; Sat, 16 Oct 2021 11:15:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=q7mA/5NMDye+T6oTs6PprYj8IGolC1UqhFN/enpkEuI=; b=CYRRM+1Zt4xdytFXUYebvXDMeo5Z2gTrx9RnIqxvQSzkc9shssiaNuX0zQBpXgnd4d LoeDoZRpf3NcRJuEK4PhhrIqnWTZ/5Gw50xP3L6W5N600bfiOiJLY5WxfSEZ2HgiFXcN X7elmjdkE83KTWXgw1bwg8RmL2UVHnUIn8qTtwDvUiGxkodBgNHRgsXdQzgy6AYJQdt6 +fKTSK+yfDb3ZC8P3izgPDAQmuxW4INe5gmCLAs4d1rQM1VmD5tUTOa3K2ojXkLHDMRR N6ZwwPHEDX2Rus7NYLu32LbiwRw8RqVnpye99uZ5k9ZBwsd60xpnj09/bmuwzYu79QdD /UMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=q7mA/5NMDye+T6oTs6PprYj8IGolC1UqhFN/enpkEuI=; b=36wOyTXOKjolR/t2jMKFQoebkuWhSGpi2W3kTsCPz46IxWtdwdmuKgLCPxJ8etEnrP 9Fy0zXGJ12X6sjCthDNPEJMveaP8wnAonDDtJg7beU5RNI9Q4zU9gLF25SA50lZBSv0U Mq6x6OL1qqnOUxDc4EA18e241U2Ho33t/RuIMT4WRtYeUw5DZYAYAeVtuyImDYU6f9G+ m5wPtsIBDLCeuIFyEDJ8I3F9qbizKl3HiMZzFMaEzycgVyEbdnKyYh+AaLpBY8Vq3YqP RfLrRzCNHjLxiPQ+DBADOpRVOaS22IGkaRZzsfRg5vqGypUrelSzfPpFsqyvCPM9gBKN 8Luw== X-Gm-Message-State: AOAM533bBfvu11PNOv4agnaUvsulTt0HyUTQtdwTFFfTz9qKNby+ENAg cP9rmh1AsZ/GrvHdDzAavgOEcAGsnpRmnA== X-Received: by 2002:a17:903:120e:b0:138:d732:3b01 with SMTP id l14-20020a170903120e00b00138d7323b01mr17695009plh.21.1634408117109; Sat, 16 Oct 2021 11:15:17 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id ob5sm5075097pjb.2.2021.10.16.11.15.16 for <qemu-devel@nongnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Oct 2021 11:15:16 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Subject: [PULL 01/24] accel/tcg: Handle gdb singlestep in cpu_tb_exec Date: Sat, 16 Oct 2021 11:14:51 -0700 Message-Id: <20211016181514.3165661-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211016181514.3165661-1-richard.henderson@linaro.org> References: <20211016181514.3165661-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1032.google.com X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
tcg patch queue
|
expand
|
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 5fd1ed3422..c9764c1325 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -383,6 +383,17 @@ cpu_tb_exec(CPUState *cpu, TranslationBlock *itb, int *tb_exit) cc->set_pc(cpu, last_tb->pc); } } + + /* + * If gdb single-step, and we haven't raised another exception, + * raise a debug exception. Single-step with another exception + * is handled in cpu_handle_exception. + */ + if (unlikely(cpu->singlestep_enabled) && cpu->exception_index == -1) { + cpu->exception_index = EXCP_DEBUG; + cpu_loop_exit(cpu); + } + return last_tb; }
Currently the change in cpu_tb_exec is masked by the debug exception being raised by the translators. But this allows us to remove that code. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- accel/tcg/cpu-exec.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.25.1