From patchwork Fri Sep 24 13:56:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 514573 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp1498109jao; Fri, 24 Sep 2021 07:00:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSzFnQOgAMcQGb9JVx02xBjqRqfQy5v17defDosqhc4QMLyYAss6hm/VID79/E2JLHgxDw X-Received: by 2002:a0c:8e8e:: with SMTP id x14mr1308651qvb.67.1632492006336; Fri, 24 Sep 2021 07:00:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632492006; cv=none; d=google.com; s=arc-20160816; b=ViCw3DBZp5rVvird88G8nELx1sVrwezt5dEzwHO0GuXobik/OPUNE/4PwSWU1oL1Wq sSiqJDyaNBXo92xgndfkgeeK39uyPkzbWMzwpBFllHKo874FqnDT8l2YMa2dQIQFzsl3 zYMv7J+QzKpm4hPl1uWbeFfNIWLICvdQIWVxJqatzJWUEiuEU+U53mFPVsOgdD73S8pf dujI1kWgwVpOdqlhrll3XqExLYtIVqroBHB8j/3p0sfCrE/c441ce5zN7Cilt8zY/fed TFBXCAbT0w541/IzBM0WodymgPD40Pmx/+wz+xg5Xcffgv/xg0S2QmGvYAGg+Q/fJis2 dwcA== 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; bh=vVA0mkR6BXMMWYIynuJCwykKk2feaAE05gyx9c1vaBY=; b=QqbWprgShqJ/4CiLk6OtaOZ9UaGEhuzIn9DCUTrGH07NOpgKwNaVWZsMp6KHyFUr+u l7tYjc8q8EnSUdoBQjf99GNhhSsGwaHHB3R94sWUNC0SSTQKUIvZtkiyI8u6fntGpiqL fXp9ZXDKydqH0CQKF3tuUK0X2byZt7x3UW64n4UiplnO0+LOCOHcxtBfxtsYUbPo4A8u migBgVzGwHc1/hkStH7T8MXk3aokwb3rfoMi/GWMYZctUkorxL+JWHg0Gn70Zm50gS+w 2kQdbDp9cM8GKtECO1WiqWb9pbE2Ci5CQeXC8GXOOSzZ9m7EDqAkoiI02riw95ngnH+G 7q4g== ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f10si6563040qkp.212.2021.09.24.07.00.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 Sep 2021 07:00:06 -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; 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" Received: from localhost ([::1]:60930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTlkD-0000DS-Ow for patch@linaro.org; Fri, 24 Sep 2021 10:00:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTlgt-0002zU-8u for qemu-devel@nongnu.org; Fri, 24 Sep 2021 09:56:39 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:35781) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTlgq-00058S-Ug for qemu-devel@nongnu.org; Fri, 24 Sep 2021 09:56:38 -0400 Received: from quad ([82.142.21.142]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MtfeD-1mi8Le1gHH-00v5ku; Fri, 24 Sep 2021 15:56:33 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 2/7] linux-user/arm: Set siginfo_t addr field for SIGTRAP signals Date: Fri, 24 Sep 2021 15:56:26 +0200 Message-Id: <20210924135631.2067582-3-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210924135631.2067582-1-laurent@vivier.eu> References: <20210924135631.2067582-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:GG4Ei9bgJnhqFlbD4cbNUt5vrrHJzrkD9ShlT/QeeBu4wmNQPO9 1mu8LTcY+N5/0nFHltZs3sRyODmOzvpSkek+11/QSQ9SFAGGWlnHubSbAKPUKSAcUp9xscL 5zs+fNREp8mHdzCg5yuSbRqOJVDwEKi7qWwUNhihsWPxy2My8m/GO4z6YtwOUdFmsL89lCH ZM39yxwdqcWC+W363dObA== X-UI-Out-Filterresults: notjunk:1; V03:K0:vvNUg0noIpU=:58GBK7gN/HXnlF/zsO7Oim KHMOtK/KEhxJ+H8NkhxAKnnyoMzqGNZhC+6mJDED/Fd8w2L5/T7Jw0HhzA0EtT1406vhtsUXD nTDge4tUGUu9h8HNYhT1a2ttHDKmlENkpgRgjL6hPZyL4R+IfvhZiGuE8f3fP/XwNSQPy1H00 qAarhkxoh7xu5a09elyr/IJBX++RwZb03mTCa8BzwJ6ph92+4kUyPu0R0kTgJ583Kje1CqSqM Tr38GGnJKqc87m592KqyH2szppSW9bmDZyyqMnqA5hQK+UsTQVfzM8Fbzzxf1ecAjMcxiZMKh oIiztPLQFt0E/zL6HjlT6kgVUsJZ+ibN/lPjwdsB45zAtXGjeU3bmOFcykMYM2jCJlA6ly1y0 jLumwkguDkzISRpl/Go4PWTTN79t6QqphcuGBIcbP7TnPc67BbFAX6whFilW3LCwVqoqXvMy2 Y+JdwA7LmPf2lRpfVnVs/hg6R3N+avBWemSP9xdFFPWdbLV2JM8sFGVjATPHvxL9NrBduyWwV gZOFmMDFIgOJZzNX+zJzRvgyIvZKp4rPHj+1jkcAE5NRpC9Gb0vnA/CJuStc+k+hlBr0M13BX saVLLo0QmML0twzNlzqVIBleiLZr7Kp0dqPfcYBsES6gunavet34AqkMfKLy7mWsBDroXWfmh 5iDs4uuQGD+YZBU0fGRuDkZR1AYY2A+4W/6ql1Q3KlzYv9x6Fsd6B2WzPb+6rCAjmWxzU5fLt qZofud5xD/th84/nv+QQ9z3RG5uBs5GuwU9mYw== Received-SPF: none client-ip=212.227.17.10; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=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 , Richard Henderson , Laurent Vivier 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 Reviewed-by: Richard Henderson Message-Id: <20210813131809.28655-3-peter.maydell@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/arm/cpu_loop.c | 1 + 1 file changed, 1 insertion(+) -- 2.31.1 diff --git a/linux-user/arm/cpu_loop.c b/linux-user/arm/cpu_loop.c index 07032b300610..0900d18105a1 100644 --- a/linux-user/arm/cpu_loop.c +++ b/linux-user/arm/cpu_loop.c @@ -455,6 +455,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: