From patchwork Thu Apr 21 15:16:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 564347 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp539086map; Thu, 21 Apr 2022 08:28:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyewcZ8M/hxtFM5uSpAeZPzB9A7mZSHvGwV0h7ypvnwRYuytqhxYXGvbW4gI7ZIw3NRH3FS X-Received: by 2002:a25:9f86:0:b0:641:6505:cb55 with SMTP id u6-20020a259f86000000b006416505cb55mr176995ybq.297.1650554907716; Thu, 21 Apr 2022 08:28:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650554907; cv=none; d=google.com; s=arc-20160816; b=rhIzl/8E0B3K+oy8h6zUr/9U1RygKYx1ZtDpx8Cbe3SH/OHLsN0szGwQXPgn/LCo6i +PtQcxUx2AccIWdt+419cj5Pq/iY/SXGpGMxZRXL8Y5ly7jqJ/WjxAp81HEwmWZ1ZShf otUOxroEkB0VQQ3HWIPr2b7S5spE08+1VhrxAOFaG4wcPdN+bXCuCQJDjOrN4PEpswBs GohLDKgiKKI1FwIHxLYm5FY68LH83GSs8+xs4k9w8H8DsDMhK2sm1JzYNSCX+2Sjjshl NHOeVg54yalsdOZUGx5R1143EROuX5aE9iKPTcXTb6kiw4ijtOiGl3rt8hrNEfo4Nd7s y5ag== 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=r/x/miQLf6ebWpV7bnXYZjExmKCWn1NklUL03LEs0Hs=; b=XK1iiKPCqbsoHdwjr86MrjzYbexFQM94AmUZk/L2516HNuEC19tYWtcSJyIlcHk8Lc 7ZMjVOMMqXBQYqBu3OqDO1CcLUA++BuK6a0MWPQw0zb+2U08puvGw+ZvFEFW3TAMJbjS 5ICBpprC01gfryzjaxC7wI17n+7MVURCL54miq8cq7b7AtVrUg3X8Ym+e9F5PO0G7pZx lgcJDAaoGdb7ArxX353/Ah/8v9yTmqEBicV6RRdsIzrf3wJVFAj/cdUzW5gZO78uXBno Uo95FimAbsL1/ZmhDKKbW/USt+EM6elB2lz95ELxGVUqXg/P30uVs+tPORr3xNlmQHKR Q+Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a972qkJg; 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: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 22-20020a250b16000000b006458019a6e1si727951ybl.159.2022.04.21.08.28.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Apr 2022 08:28:27 -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=a972qkJg; 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]:40356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhYjL-0008Lc-7r for patch@linaro.org; Thu, 21 Apr 2022 11:28:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhYZD-0007BJ-MD for qemu-devel@nongnu.org; Thu, 21 Apr 2022 11:17:59 -0400 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]:40514) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhYZC-0006FY-5e for qemu-devel@nongnu.org; Thu, 21 Apr 2022 11:17:59 -0400 Received: by mail-pg1-x52d.google.com with SMTP id h5so4900255pgc.7 for ; Thu, 21 Apr 2022 08:17:57 -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=r/x/miQLf6ebWpV7bnXYZjExmKCWn1NklUL03LEs0Hs=; b=a972qkJgvJZwLAoP+bpRHSBrXuUyaZ0SI5E6J8dHpxlNSO4dOVvLPMK2vGGIxCTTa+ yaP3y4RdR4ZngL8ac5H6mOW5euQ/jNVFXg64t2YJHY39DOmN8jTtjOSHoyddl7K9nd7v oK/7XzvgqfGWRVPJ45jolOETY/oxcITwwcFNC7eLejsxyHGE2tMFVKuq8m+23GpKr4wa iIZPTgeGMVPvGOhnmijfXmBTITPrlCMm/htTfFUXuNMCkOGm2bCiJLMmKZimPu5FSfj6 drSxMY0G/pfKyNF8EFRc9dWnBFWODzl1uiYf3f4yjffC/9vKTay8EPUunSKFIFNCzYPg hDBw== 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=r/x/miQLf6ebWpV7bnXYZjExmKCWn1NklUL03LEs0Hs=; b=kI+vEZU0i2jGNzWGErd5CfuEKnlfenRDx0vMnWkkMtVK/GFG+ed/C5EeHXQycb8wOa xi8o2PCjfmmCuv19v2KjSxY116cJsXfmrxh3FD4/EJpjAnFIs0yQDw3Ph4Bk+6I59IGg GoDFYHndGsoEpo4+mDB149zZa88aucH2oE8JTv86APvg+4LjctSTY4pCq52DsqtqdrNm KS0AVSp6PuUOtdhz65ZtHZutyWbqXVtDFegUnIqPia7BCm7c10CR8c6Lh9FbBjZ9s4x6 7OkECIlCSCC1rAaKuY9BTtXg/zJ03x0cg6mtV9p7NXwbJiC+/OmjzCg2UioG2HKY2BbE GLQQ== X-Gm-Message-State: AOAM532sWCsg6WUx8a4ZHtLJEbKhjl4MU8u3+CdpRykjF3GXa7qu7m+n 9VduTGMSCwMPoiUgE0dDyaJb+YP5XcmWCw== X-Received: by 2002:a05:6a00:3494:b0:50a:6317:80a1 with SMTP id cp20-20020a056a00349400b0050a631780a1mr160056pfb.24.1650554276915; Thu, 21 Apr 2022 08:17:56 -0700 (PDT) Received: from stoup.. ([2607:fb90:80c8:6cf3:a91a:4957:ba18:ac18]) by smtp.gmail.com with ESMTPSA id z16-20020a056a00241000b004f3a647ae89sm24616248pfh.174.2022.04.21.08.17.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 08:17:56 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v7 12/64] linux-user/nios2: Use force_sig_fault for EXCP_DEBUG Date: Thu, 21 Apr 2022 08:16:43 -0700 Message-Id: <20220421151735.31996-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220421151735.31996-1-richard.henderson@linaro.org> References: <20220421151735.31996-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52d; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Use the simpler signal interface, which forces us to supply the missing PC value to si_addr. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- linux-user/nios2/cpu_loop.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/linux-user/nios2/cpu_loop.c b/linux-user/nios2/cpu_loop.c index f37850fe81..e725036628 100644 --- a/linux-user/nios2/cpu_loop.c +++ b/linux-user/nios2/cpu_loop.c @@ -26,7 +26,6 @@ void cpu_loop(CPUNios2State *env) { CPUState *cs = env_cpu(env); - target_siginfo_t info; int trapnr, ret; for (;;) { @@ -121,10 +120,7 @@ void cpu_loop(CPUNios2State *env) break; case EXCP_DEBUG: - info.si_signo = TARGET_SIGTRAP; - info.si_errno = 0; - info.si_code = TARGET_TRAP_BRKPT; - queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); + force_sig_fault(TARGET_SIGTRAP, TARGET_TRAP_BRKPT, env->regs[R_PC]); break; default: EXCP_DUMP(env, "\nqemu: unhandled CPU exception %#x - aborting\n",