Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1572546ybh; Mon, 20 Jul 2020 01:31:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGRIgt80kxxA//GwGySs8RhHggk4uM4UnHabEeP1oGTc+DR27OygEC7zCiHXFy2FP8LvjU X-Received: by 2002:a50:8186:: with SMTP id 6mr20900660ede.45.1595233893857; Mon, 20 Jul 2020 01:31:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595233893; cv=none; d=google.com; s=arc-20160816; b=JtWsPVSFq390DEMMvORpfIwxw13kXUJF3bOh0isXJ+yp08pf8337Nb0ENKYmaJ+VNj SSARWVn1L8bUmRTmIvM+IvraCOocZm/QnosDLcJGTIJfDsJw/EQC8MjYtPCTg+5I/iYG Nj0g10ZqMvhtoPurU50xAdv9hOn+SaY7GbDIRQSfAKj/c8NUTZypuu5K7UxyW9l4V8ee A6kYIYJwa9N7Miu7Tn0/KTYO3v6kM3uH2FQG/nHKJWRTdARQifM1WGYGta3VZVjMRot+ zmav2zslAYNnTD9taTcwNDMHMAMMDXZiSkc6xKMhbDkPnRwsguW7XBLrl+bOkEiglALJ itZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=VHz+fh9KhorFs1TLxN9L3mwYW6buhjiKAJZKsFMcKOQ=; b=sdhyvVrvnUEjdNIIfhGPB6IhazwBnLIqbzY9rD3eJbxSkM34Sg2tOTgTrTqHEYqssT pcl1XSz/C7QZLy5MkcoD7G0qMoK/k5ctQS6vHO8XHtYM+xJS1JRmzhqg1maWyACKz8U6 fgnPFihXVt5fEG0KoqupDbAS23WsJduiFBoj4RLMHHr+ARBAPcQXMvKDCdgYrTk72EbB zn4oGODDuoy0lpDV3dea7fEmGQlkvVRXEsyAhR80KDb/3z2gHKwte6oFjG9v+s0VXtpd PHwFdjhgYoo1Xp1jOiKPGwN3C/QwBslz8JzzMSeSzmzbEQtCSS9iiqdKRIWvMAjLmhzP CHzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@chromium.org header.s=google header.b=RUixrVyL; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y19si10832228eje.56.2020.07.20.01.31.10; Mon, 20 Jul 2020 01:31:33 -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=fail header.i=@chromium.org header.s=google header.b=RUixrVyL; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727113AbgGTI2S (ORCPT + 99 others); Mon, 20 Jul 2020 04:28:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725815AbgGTI2S (ORCPT ); Mon, 20 Jul 2020 04:28:18 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17695C061794 for ; Mon, 20 Jul 2020 01:28:18 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id f16so9719219pjt.0 for ; Mon, 20 Jul 2020 01:28:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VHz+fh9KhorFs1TLxN9L3mwYW6buhjiKAJZKsFMcKOQ=; b=RUixrVyLy/D6O2GPVqA+VLNharw26Ydp8E7gQETyGg2n+yz8QV2yP9c627s6o9FBtP MEiLFH6mIj/cYiE1xnchA3oTTEdJ/mhJPqA2OwY6A6DFyy+L4/94Rbv/yganEIEkwDA7 mamNcbjGwGuugX769pTgiVCIUvVXaMoiSczwQ= 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:mime-version :content-transfer-encoding; bh=VHz+fh9KhorFs1TLxN9L3mwYW6buhjiKAJZKsFMcKOQ=; b=STckcrNJICmz87OmwNzvlbIyHS4rJrqggnXYFEiEuxAzvMO0hvsNRUXZN/EAVTEZV5 K16l5a/YcNxp89gtkOMt39naneEL+DS7qnVQQ6EQVRpBTMCqHKt0xJ9u4SQBy64Xf58E UMOXzWER7vvnk4Zu7UQLe70u8jup3qG79FzYMI4JjoZXQKwHAbySi19YXhqGChQ0ckuc WTl0aSsHtyuiTcWugby0u2w5U0oniHBEtbGKJdDR6/6kKEaGL61MnZm7wHaJrMavhps1 54qNayV+33jhbLeV5yUemME/+QtXN9+xi+xeyc8dCfp+X3acWCiIoZCQoKkyGoE59769 ewdA== X-Gm-Message-State: AOAM532h1Pf7YzaqGdWMFfdqRen/HM3s/LyEvQs+aY2nqkpThfMA4d63 Sc2XiHXK4l9XDmeD1didGjzqYQ== X-Received: by 2002:a17:902:8e86:: with SMTP id bg6mr14845530plb.57.1595233697582; Mon, 20 Jul 2020 01:28:17 -0700 (PDT) Received: from kafuu-chino.c.googlers.com.com (105.219.229.35.bc.googleusercontent.com. [35.229.219.105]) by smtp.googlemail.com with ESMTPSA id o3sm5513095pfu.81.2020.07.20.01.28.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 01:28:16 -0700 (PDT) From: Pi-Hsun Shih Cc: Pi-Hsun Shih , Shik Chen , Sasha Levin , Stephen Boyd , Andrew Morton , Nicolas Boichat , linux-kernel@vger.kernel.org (open list) Subject: [PATCH] scripts/decode_stacktrace: Strip basepath from all paths. Date: Mon, 20 Jul 2020 08:27:07 +0000 Message-Id: <20200720082709.252805-1-pihsun@chromium.org> X-Mailer: git-send-email 2.28.0.rc0.105.gf9edc3c819-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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") Signed-off-by: Pi-Hsun Shih Co-developed-by: Shik Chen Signed-off-by: Shik Chen --- 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 66a6d511b524..0869def435ee 100755 --- a/scripts/decode_stacktrace.sh +++ b/scripts/decode_stacktrace.sh @@ -87,8 +87,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'/' '} base-commit: 5714ee50bb4375bd586858ad800b1d9772847452 -- 2.28.0.rc0.105.gf9edc3c819-goog