From patchwork Sun Aug 22 03:55:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 501398 Delivered-To: patch@linaro.org Received: by 2002:a02:6f15:0:0:0:0:0 with SMTP id x21csp1059080jab; Sat, 21 Aug 2021 20:58:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyw+Q2XS0wxJbTDd3mfTOGmBA/YKlecWjZ4bjLdyk4xN9iFMrBAr9tBnvWx1tB+5cjmtQ4P X-Received: by 2002:a25:6949:: with SMTP id e70mr15700713ybc.67.1629604724100; Sat, 21 Aug 2021 20:58:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629604724; cv=none; d=google.com; s=arc-20160816; b=biHICrEfDGEbzmfIEN/stCytlCwP3yIx4L5XDuX6/4wNzfFbxqKUrZv+FsdScY6tjw aTQNXF32Wb6/Dancdm0lBPThMdmqfsl5TUYPna7te7NACGirkPAmKi7S5mSaW2XSY5ih IckzIWS9/6PMvnLGNbq4amWSz7OfVLq3/Sr47s2WlEdqkHG7An400ABZz1rENsui0443 zrcCcw2uWLkiPIT1zliie9GaY6gFpTmuNedcOSA3lORulFi91A+5kvHHAWL1H33LBubo QwBsHf67QAK6Edzs5SXTnD5c8DFySgEzJD6QWsuW0CcOSeEuVHYiqM45+WtSqGViHfj7 34nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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=wxQXtJmn/5fHjbKQYnHYNPRKlKJ8RKfJONraii7URWo=; b=pgBmXPZRCDroj0dCwCWoNUQVnvnGCQAewXoCwFfATdbe479bL2X1r+HtKc0bCaazA4 /SJkxIoc/Ma/c80W4rL3Onb7KfEMqk9w1V8mrFjQVWc8vQN8DapmD4ttwHQ2ouN+U989 DwuXUYYwzTU7AyQJt5uCP3a2AVUlEw5NVnjgGIgZefO5x2REdgybY+WfKqytv/9C2XFN ZCFv14D+mBdszAyGwEO/4DBIRtDE7YeKfDwBi3RF8+yEIU+0je9af7iS0y8uChO30RnV SY0dXCk8fhf2UurtwVvEg+OsB+quJJ83klhrKQ96Snw8r5YbyzNO5Xm7sliC1bGY8ANV qL/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MXbarbi2; 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 l203si12819533ybc.359.2021.08.21.20.58.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 21 Aug 2021 20:58:44 -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=MXbarbi2; 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]:45934 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mHed9-00055C-Gd for patch@linaro.org; Sat, 21 Aug 2021 23:58:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mHeaG-0007hE-UF for qemu-devel@nongnu.org; Sat, 21 Aug 2021 23:55:44 -0400 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:43570) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mHeaD-0000Ym-9c for qemu-devel@nongnu.org; Sat, 21 Aug 2021 23:55:44 -0400 Received: by mail-pj1-x1033.google.com with SMTP id qe12-20020a17090b4f8c00b00179321cbae7so9900605pjb.2 for ; Sat, 21 Aug 2021 20:55:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wxQXtJmn/5fHjbKQYnHYNPRKlKJ8RKfJONraii7URWo=; b=MXbarbi2spXS8eJpRD710txdVUYKuU3Oju+UFC5UZV1jMy5QJ1Ee87CNEs6F3TOEdE ez894NSfY6DhA34yqPloyFDQaf1/vw1E1EX7Ibzr9bcQznCABKLQkxz4Hd3h3TOi7aEn u+sob1uzzXzKDU5/WGE9+UpkmVCILvyUHHM8GPrqtvIhgiuOz9O6oxGhxYCUfOh+Nr7x 5bYXZDJnK9IUzVarpMedqR601CWmOgE+z+sXxvWus+t7DDVav7/bTaNLLjZfULomO8GE TErcKD57UC2zrBhgPt4k5iHCLplTuY4KB+/bja0QmkRRac1NbfRu3IkNcYsCZPefxigp TEEA== 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=wxQXtJmn/5fHjbKQYnHYNPRKlKJ8RKfJONraii7URWo=; b=FhGKT0abD6nbxOWNbDeuJZfUyTQK6xJUeMdIUmrjXkPqKI2nMh3i5fHgbhzQA6sumS TqOT7xsqANo58hXCW+PcXq/LBDLGnK5x+TheBdFliCM/ERWj/H18bKnq3hOFGp0BI1X0 7Pyl5Me4vhdL8X0eNsNih2SaGzeR+is7aOqE9wmPnsVQ2PtyG1HluIpkhSQoPxs2w72g Z4ojuWJUnVNc2oh4T0QHk1YwEBWx9mcFxLIfh9qfdsLaNUhidtY1ZgtkjWsirRgI9VCo PcK5Z1UrHAT7niHT6WbD1GyKkXtSS8TfN+/bXuBZNuWBKbTuUC88/p6RR2+7XZHBPeKr i5rQ== X-Gm-Message-State: AOAM532KKaukxAjJVWqSNLO+I6BiiJN1BH3UvdjxV7WZ0Bdg7zZxe5TW zytGsEB09zROHbVImgmo+udWNJe8jHCRNA== X-Received: by 2002:a17:90b:4d91:: with SMTP id oj17mr4023013pjb.209.1629604540080; Sat, 21 Aug 2021 20:55:40 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id x12sm11560533pfu.21.2021.08.21.20.55.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Aug 2021 20:55:39 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 02/30] linux-user/arm: Set siginfo_t addr field for SIGTRAP signals Date: Sat, 21 Aug 2021 20:55:09 -0700 Message-Id: <20210822035537.283193-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210822035537.283193-1-richard.henderson@linaro.org> References: <20210822035537.283193-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1033.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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell When generating a TRAP_BRKPT SIGTRAP, set the siginfo_t addr field to the PC where the breakpoint/singlestep trap occurred; this is what the kernel does for this signal for this architecture. Signed-off-by: Peter Maydell Message-Id: <20210813131809.28655-3-peter.maydell@linaro.org> Signed-off-by: Richard Henderson --- linux-user/arm/cpu_loop.c | 1 + 1 file changed, 1 insertion(+) -- 2.25.1 diff --git a/linux-user/arm/cpu_loop.c b/linux-user/arm/cpu_loop.c index 69632d15be..007752f5b7 100644 --- a/linux-user/arm/cpu_loop.c +++ b/linux-user/arm/cpu_loop.c @@ -453,6 +453,7 @@ void cpu_loop(CPUARMState *env) info.si_signo = TARGET_SIGTRAP; info.si_errno = 0; info.si_code = TARGET_TRAP_BRKPT; + info._sifields._sigfault._addr = env->regs[15]; queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); break; case EXCP_KERNEL_TRAP: