Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4888910pjb; Mon, 27 Jul 2020 07:40:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqrdYSKHVJxIBh3sgX4FBiWiNTfUmfPCQrFnc1gb7VjpNcmLC6O8dvmoE8hV6tLZhA4yip X-Received: by 2002:a17:906:3616:: with SMTP id q22mr11074634ejb.79.1595860807130; Mon, 27 Jul 2020 07:40:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595860807; cv=none; d=google.com; s=arc-20160816; b=anw+VGCPEID3s4ybkUF9p/8NEJo+N7Ld7Gq2n+kikJzwcQS4KlIfl+Lvk0jPG1ixKA fgxGeE1dRhZ6UNyxBNtM8CZ+FLHgzpl8u375aJnpDxmYNCp5H+6TZU6NceBkLbGNnLHY XfK+e9fbmNQoiF7tQsYvAsTUMyJOIkANOeagWxgL2fpE9q4DntGZZx8JT+B9e2i1TLB1 zKTloL3RHQoWIhyMyakBV0ae6rb/DkgR61p6aGGCrT2uRKxG8BA4ezh1du+5zYXWqTwl x/AtThsw4zpaNSUFC7Mu4gAoBqsckpBK57ndTrkJzF51uZhG3CCdGOegeFt6LQ9vE+a/ +m3Q== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ofRsXTvyfxndN5L8ihNQ01lFcg2tyvXnUHiVmvT02sY=; b=wEg+VI/XzL5k6X/d9wwK5W5fiEmvlDjNKTZuSf9xI4rqGSfgEfnCCwzhqMhkUXtchW oqSroKnGo+fF8dRsYJRdEYNCy22f4F9WWYQeyCFRcK6r1XrPqA/tbDXCtlw1CA9ZVNle rVt7gJfRvwcmJsVp7sE+zD07gZEmdWQfRgh5FzCevn7IQxWleJOYVd6/rQ5gOOe2sIMD nVQ0whopdNqDHOk6XBrpA7Wx7sAHtYnfz6HIoTW5OvaEIqpr2nnQZThwSvW9c8K2EoSm ptlij7JI3CWr8pdqjl6iwxRQ672DCM7aPujM8HsRUca0oTZU0Vrtbk6XZhfmFdkCmebc LZGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yBVwAQqn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x17si6628646edq.518.2020.07.27.07.39.45; Mon, 27 Jul 2020 07:40:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yBVwAQqn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729897AbgG0Oih (ORCPT + 99 others); Mon, 27 Jul 2020 10:38:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:33454 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729864AbgG0OKd (ORCPT ); Mon, 27 Jul 2020 10:10:33 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D1C9F21744; Mon, 27 Jul 2020 14:10:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595859032; bh=xQI0yFnzNSvyeRpOKzZjkpmDe9gDpNvkcWJfGC4Ahyg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yBVwAQqncffz0jLtuUxfupds0anVjQAYvOeyIMz5amCDHOKxjyatEOaYXbC5rJQCH vGeQrtY8W2KYjYPUsL3XWj5lve1tb5snMzXSVn0vBIqmR54liCp3HrvwiTt7g4znic cIN3lLw0b4/UMGoycHPy3RG+voVTC/vI9uW8UcvY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pi-Hsun Shih , Shik Chen , Andrew Morton , Stephen Boyd , Sasha Levin , Nicolas Boichat , Jiri Slaby , Linus Torvalds Subject: [PATCH 4.19 41/86] scripts/decode_stacktrace: strip basepath from all paths Date: Mon, 27 Jul 2020 16:04:15 +0200 Message-Id: <20200727134916.507425735@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200727134914.312934924@linuxfoundation.org> References: <20200727134914.312934924@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pi-Hsun Shih [ Upstream commit d178770d8d21489abf5bafefcbb6d5243b482e9a ] Currently the basepath is removed only from the beginning of the string. When the symbol is inlined and there's multiple line outputs of addr2line, only the first line would have basepath removed. Change to remove the basepath prefix from all lines. Fixes: 31013836a71e ("scripts/decode_stacktrace: match basepath using shell prefix operator, not regex") Co-developed-by: Shik Chen Signed-off-by: Pi-Hsun Shih Signed-off-by: Shik Chen Signed-off-by: Andrew Morton Reviewed-by: Stephen Boyd Cc: Sasha Levin Cc: Nicolas Boichat Cc: Jiri Slaby Link: http://lkml.kernel.org/r/20200720082709.252805-1-pihsun@chromium.org Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- scripts/decode_stacktrace.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh index 5aa75a0a1cede..946735bd5a252 100755 --- a/scripts/decode_stacktrace.sh +++ b/scripts/decode_stacktrace.sh @@ -77,8 +77,8 @@ parse_symbol() { return fi - # Strip out the base of the path - code=${code#$basepath/} + # Strip out the base of the path on each line + code=$(while read -r line; do echo "${line#$basepath/}"; done <<< "$code") # In the case of inlines, move everything to same line code=${code//$'\n'/' '} -- 2.25.1