Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp810859imu; Wed, 9 Jan 2019 06:49:56 -0800 (PST) X-Google-Smtp-Source: ALg8bN7tyq81YnIRVbjn5xatHGkwbGmWOQEheG3qY2SrnZmfXYz1kQPSpMUJvagEt4+lrCSYcgQh X-Received: by 2002:a63:fd0a:: with SMTP id d10mr5706265pgh.164.1547045396634; Wed, 09 Jan 2019 06:49:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547045396; cv=none; d=google.com; s=arc-20160816; b=Adju5E+vo7D+5EERzrRKstlOEFrvi1Bx6T+VMwW3FdtsJhXliD7F9J/3lrmrnU3Rr1 pzFpsJule8fX2rSnWRzeLBCxDp2XAMxsy7YMRO10xgq6vRgTfL7tCRoAITeg1oPsXk4m LHsHrTPOrlssFHbgjCu8ww+ADxlrRKqrKIhNRLPOr36M8aGMbbJnMcLI84Rq8NvMinvH wzwvAFfWD+ccfAg5ZndJ71FtS1gjn7oIr6u1HTqhIZsSbGaUSb9ohMkNlB2dEvbCyKXo kHFnyI8iKSibWxUe5Oa2+kwD2MJ6I2uH5oILp4Tl0Nq+tI8v8TFvRCuuq+/TLRB1EEqA 3hiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=IErV9AitOJn2HoPsl3c0tkg0hRU0BPj8rQ2xPrCReYQ=; b=dEwxweYeClbsnGT6vISqR7llW52TkeAjJLMFFWhY0qdj5Lqs50AKGgfX6E19aQEHwh cwhKNM+I6u3V4NDtkva/p7n2gUQhH6C440OpPbfXQLDTREN2eq0p7VyFqZASVo9h9O2M BhZrmGcYMKhAwgBKZFvuYoZR+WrLd2wseiV1OxKKw5fdf6xFbamj8RfuwiXC8MXNKVLN 8hSEwVU77ui19OgOzbEuzy0fQBZRpeK5VLbybi+EOvxNREcxEFTr7ZMkuzPFGvLyZHGa FTofNDJO9bvvlKDEcNM5IyTYObLdJ3w5ZfqtNL3ZQxaa8zHoq75rQe9GeU1qcGyQDMiy 3oEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k18si3953044pfd.241.2019.01.09.06.49.40; Wed, 09 Jan 2019 06:49:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731913AbfAIOsL (ORCPT + 99 others); Wed, 9 Jan 2019 09:48:11 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:56626 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731878AbfAIOsK (ORCPT ); Wed, 9 Jan 2019 09:48:10 -0500 Received: from [5.158.153.52] (helo=slartibartfast.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1ghF9M-0002e8-AY; Wed, 09 Jan 2019 15:48:08 +0100 From: Manuel Traut To: linux-kernel@vger.kernel.org Cc: sasha.levin@oracle.com, Manuel Traut Subject: [PATCH] scripts/decode_stacktrace.sh: prefix addr2line with $CROSS_COMPILE Date: Wed, 9 Jan 2019 15:47:56 +0100 Message-Id: <20190109144756.24202-1-manut@linutronix.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At least for ARM64 kernels compiled with the crosstoolchain from Debian/stretch or with the toolchain from kernel.org the line number is not decoded correctly by 'decode_stacktrace.sh': $ echo "[ 136.513051] f1+0x0/0xc [kcrash]" | \ CROSS_COMPILE=/opt/gcc-8.1.0-nolibc/aarch64-linux/bin/aarch64-linux- \ ./scripts/decode_stacktrace.sh /scratch/linux-arm64/vmlinux \ /scratch/linux-arm64 \ /nfs/debian/lib/modules/4.20.0-devel [ 136.513051] f1 (/linux/drivers/staging/kcrash/kcrash.c:68) kcrash If addr2line from the toolchain is used the decoded line number is correct: [ 136.513051] f1 (/linux/drivers/staging/kcrash/kcrash.c:57) kcrash Signed-off-by: Manuel Traut --- scripts/decode_stacktrace.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh index 64220e36ce3b..2f8c30b5c85b 100755 --- a/scripts/decode_stacktrace.sh +++ b/scripts/decode_stacktrace.sh @@ -66,7 +66,7 @@ parse_symbol() { if [[ "${cache[$module,$address]+isset}" == "isset" ]]; then local code=${cache[$module,$address]} else - local code=$(addr2line -i -e "$objfile" "$address") + local code=$(${CROSS_COMPILE}addr2line -i -e "$objfile" "$address") cache[$module,$address]=$code fi -- 2.20.1