Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp714777lqp; Wed, 22 May 2024 18:56:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXLMHuow2t+2/p+8Lbex8v2WibuPn74Zo6Zz+Lfe4fXpvy2/uRCEcgyPWhTOnMKo6yooprjbcsW34gLBxiTCT/v9jQTnMCpl2Nl7e8Idg== X-Google-Smtp-Source: AGHT+IEk+7iUYubzHRzje9KbGvQuva16XnOnjpiQ0tSo/c4eErY44ZvrImwVF4Z36q0Ta8VdnMri X-Received: by 2002:a5d:490a:0:b0:354:fb1f:8b5e with SMTP id ffacd0b85a97d-354fb1f8dd3mr59173f8f.33.1716429409305; Wed, 22 May 2024 18:56:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716429409; cv=pass; d=google.com; s=arc-20160816; b=BIPANmJAIcwbK20iu0a6m3vnMB12dDztStTe6ToMyRaSCKOFa35S1Ibav8+yYw6v+M nAcvO216bdrclZ060Nlv3I0+H+3C3EKar7MEvcPaH7bNQP+XC0f4vK0/z3uatstUqkg1 VbOVZoyfavDqHUzIF2JmX6Ue+Npy/uO+h8sUD2TSHvfQYb4HpgvA35YXC4cDSPsTXzjZ IT/t312XnFphgj9GVmr2uO3ClUQTryYtpYeBfskRY8f9/go13GYAEVZifFcRCt74cX8z eQ427a93y/NNup4ugjuEzUWiSiTmkZfVMW9KAqx0GZdsJlJjKeJKd2pkyuAdu4yf5NB4 SZrA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xCFv3e6r0rcQyZLLSdgTL+V8y45gOmc5gjoqM82CGt0=; fh=lj4j4DD5Hn0dfxUdP1Yp41hNXnLopXwSGCjv6zKOR0U=; b=kMJFlmrVjNSaCoUwRVdj746Hq218WqPh+wdOk3iS87B81tfT8ZQzIQmQeM8z2dTa4U 6UZRafGU4ZMZJtcQSsNt6NioT7lCaQlPLAJj+QEHOeXsZO05uxg8vMIZOfICx6wXvgNM EGAyfQLN0ac9YBwL5+I8+q206O14fvvUMlaYGUV+x2BJ+RHBPELoJgymXUDLo69ZW4Tb gd4Sn4Jstimh7KQdYzQLO930nYgHJmrKJKoMc5Smw71aWvrja5b+jN9/4Fc4CFwVmBH1 JzU9q9BS710NWifBeOQxFF02t5gxIylBp2vrSWMfjavcC4KUG9cqfG5Q0ILbvsx5eR5T kn4A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Z76hBx5t; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-186896-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186896-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a621ac3c2f7si186433766b.733.2024.05.22.18.56.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 18:56:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186896-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Z76hBx5t; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-186896-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186896-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 120491F21E83 for ; Thu, 23 May 2024 01:56:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E73B4687; Thu, 23 May 2024 01:56:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Z76hBx5t" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3FC01A34 for ; Thu, 23 May 2024 01:56:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716429401; cv=none; b=c0loQ8PlRaQNDT4gmK6obXuHkTXkCw+/VJBe735pQwFu9c91tucsX3aKxk3q9ZQMIsbdXQWBROi6DVKYnOForEGv8YkbtxHfPPthF03N3O0uh6aAidtkOQ3//k0Zw96IFp0Kh0GSWSkDuu7KvAzWFTOoumK/XbqqSOBO9Xz0QMo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716429401; c=relaxed/simple; bh=odqsliIp1bqB03SOjUukVLUc8qbuCHFi+9Xo8awy+IQ=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lTP1tCAAS22Ju08NgncvhAs9GJHO7VCb0IosgNq2LBW8JkQkViN56m2+CKwFvQ9cQ+9TavqWz0GzG6f6h3zme7/4omsr1yGtZ+QbNIi3JDaXfPoI71ciC0uWCSKyfDJKOadg91wNjoKvJoqu2g+/eRqeA0IIdbNkDptpjVHihvs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=Z76hBx5t; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44MHXLut010132; Thu, 23 May 2024 01:56:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=qcppdkim1; bh=xCFv3e6r0rcQyZLLSdgTL +V8y45gOmc5gjoqM82CGt0=; b=Z76hBx5tMQsXewixk7qlbnkp0tSSEp/llANtO iqFW/9IZr2GGIJCHNxn7TGGJw0VX6FMj0UunwDqVFb+X5MHkTMQ3svGcJS8VUbVt RGXIs3Eixcq/AIDegYWfMvhPVpp8/DaKU7ukMfk0tMfF7mrioEbcg+LtLG14M8+V reBBcPWMSyI1vWX1CGzr6FttY5PntQeRI7CzNIOexUDb3mHzkSSCBdthXKP8RTkF 65UHkVRB3A/0K2mtR/eq5R0jtYSW8874FV7wXSYN6f/RDpEP/NLFcuElWexr32Wy O+ljcUqvf+bQRfcBB0pFfTI957B74HElk8aX4+bT0qC1sO8OQ== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3y6pqat8tg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 May 2024 01:56:35 +0000 (GMT) Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 44N1uYN6009240 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 May 2024 01:56:34 GMT Received: from hu-eberman-lv.qualcomm.com (10.49.16.6) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 22 May 2024 18:56:34 -0700 Date: Wed, 22 May 2024 18:56:34 -0700 From: Elliot Berman To: Xiong Nandi CC: , , , Subject: Re: [PATCH v2 1/2] scripts/decode_stacktrace.sh: wrap nm with UTIL_PREFIX and UTIL_SUFFIX Message-ID: <20240522185039245-0700.eberman@hu-eberman-lv.qualcomm.com> References: <20240521194010043-0700.eberman@hu-eberman-lv.qualcomm.com> <20240523010318.12934-1-xndchn@gmail.com> <20240523010318.12934-2-xndchn@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240523010318.12934-2-xndchn@gmail.com> X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: tX6hcs2pQ3mkCwgg2uFScb_dj3eDzK8q X-Proofpoint-ORIG-GUID: tX6hcs2pQ3mkCwgg2uFScb_dj3eDzK8q X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-22_14,2024-05-22_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 impostorscore=0 suspectscore=0 bulkscore=0 mlxscore=0 adultscore=0 spamscore=0 malwarescore=0 mlxlogscore=475 clxscore=1015 priorityscore=1501 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405010000 definitions=main-2405230012 On Thu, May 23, 2024 at 09:03:17AM +0800, Xiong Nandi wrote: > Since System.map is generated by cross-compile nm tool, we should use it here > too. Otherwise host nm may not recognize ARM Thumb-2 instruction address well. > > Signed-off-by: Xiong Nandi Reviewed-by: Elliot Berman > --- > scripts/decode_stacktrace.sh | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh > index fa5be6f57b00..2bc3a54ffba5 100755 > --- a/scripts/decode_stacktrace.sh > +++ b/scripts/decode_stacktrace.sh > @@ -30,6 +30,7 @@ fi > > READELF=${UTIL_PREFIX}readelf${UTIL_SUFFIX} > ADDR2LINE=${UTIL_PREFIX}addr2line${UTIL_SUFFIX} > +NM=${UTIL_PREFIX}nm${UTIL_SUFFIX} > > if [[ $1 == "-r" ]] ; then > vmlinux="" > @@ -158,7 +159,7 @@ parse_symbol() { > if [[ $aarray_support == true && "${cache[$module,$name]+isset}" == "isset" ]]; then > local base_addr=${cache[$module,$name]} > else > - local base_addr=$(nm "$objfile" 2>/dev/null | awk '$3 == "'$name'" && ($2 == "t" || $2 == "T") {print $1; exit}') > + local base_addr=$(${NM} "$objfile" 2>/dev/null | awk '$3 == "'$name'" && ($2 == "t" || $2 == "T") {print $1; exit}') > if [[ $base_addr == "" ]] ; then > # address not found > return > -- > 2.25.1 >