Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp491445lql; Mon, 11 Mar 2024 08:33:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV+FuzRVj7wsi7wpcFu02l2IvwZGdy/0c4+zwjDV78zN3+u4p+ISvDOieb5SeyGpXdzNitpzRbllEHm16Gs4J5j30sug86JRsnlPEDFaQ== X-Google-Smtp-Source: AGHT+IHIWTTOBmY162xOw/tHWVW2LHofH9+BHyouOa15vR5pU1A+B9KL69ehwwU8jU2nFvvD4ehO X-Received: by 2002:a17:906:52d0:b0:a45:ae8b:eece with SMTP id w16-20020a17090652d000b00a45ae8beecemr566411ejn.59.1710171191340; Mon, 11 Mar 2024 08:33:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710171191; cv=pass; d=google.com; s=arc-20160816; b=GhI85XzPKD9Vtuz/q+v91an+isQYSI/U85R1Apa1Vm0m4kde8OE9kmjuepJ72ID3Wr ak+5Y0d59iObAlUquBsNdBIYjKdaQNBkMEno2wOFt+kBDZbA7i1yajje5bWdBvSBXwIy MLZ1OhTj55+pbVnOeUM+ZTCr0HVmqfOVyTmp++HaEBDNuxNmgJXsWLo/Lz8yQ3M4+B/H 9VBvjsDmehTjF+lCCDySjm4TjcVtid8kSbDIADMkplOQX1tsQmW9fTo7n1crtiEASWZ6 k/O3/wR1rJMVAQLDCFgdvIdSlJQMAeUzEbet3+0ngw5k7iY1C/ZA7JoDzA6XotpSxIOv aoXw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=bHLMM6VOo42thQAgvftidBXfGDSJiFdOugL44M1CGn0=; fh=jDum8ZwHU+yAQ4h3ArT2RpVKeuYcgphvmwl2A+O0iGI=; b=EylCghIG6na33VYMxHSu8BI2HMYAukGr2pKJSq3INhMmvA5gSrkrgywTHyOnsNcsKJ I6yBTQFBpoFGfBEf8Q6zmaofWoLLnHmSfKNtPvWfUPq5vT5YOYckVBCCjy8+0IGdRmPn CuAvOegfStzO5XyT0aJ7FgQH/BYKy0ICxv0SuHeTn9lLOR1Sk9cgG6QD6kaXAxuh+4Dv /FLvyQaxo7PfrFUV52QNWSnyxGsKA+IgwhfeSS+gzciGtiWJE0lvyTJPzNkn17GKOMyq ullrGn3xx9+s27K/Moflgcb7jUD/6yQ1jnN0J37aP5D0MKoqsuXmkQRnYlMlIsySy+Cy bkmw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=OEcv+PhY; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-99129-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99129-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id w19-20020a170906b19300b00a4637d96b53si253002ejy.172.2024.03.11.08.33.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 08:33:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-99129-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=OEcv+PhY; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-99129-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99129-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.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 BFF581F21693 for ; Mon, 11 Mar 2024 15:33:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EF82953375; Mon, 11 Mar 2024 15:25:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="OEcv+PhY" Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (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 47E1347796 for ; Mon, 11 Mar 2024 15:25:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.200 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710170705; cv=none; b=uIuqps91yjrWSBflvk0UjCX858+D4Yx7MobgukX35wtL5CxSCQFk1O1HhzRb6wyV20F6I73iV/9/bsj7pR1JURqqvibbUWqThuGczzoYojS0AOIxiXJwrWYVzIbSB0shF4hlJTgMIM7VJY3y7/gUGYE2m6BuAsHD9v2hJqWXKcY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710170705; c=relaxed/simple; bh=cCHkeAEUWjV0vuh+yfaK6MzpjAQN3B4EWJ1HtNvhjr4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To; b=oakiQRfgAe/udkKnY4XTty+KJaL5c1A7O9bZ8JUSWHI0cGEDlvW0n8fEyxaFkIw0P/dBM4G9B2WliEfxb0CnN1ywH+NSOX1N2oCezrfyZQNVY5vVvQrE5mRhH9Z/BCPM0lxxArJYCDvdC0P8K/9Temer8eotYqSN6r2b4snJLYU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=OEcv+PhY; arc=none smtp.client-ip=217.70.183.200 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 2BB6F20012; Mon, 11 Mar 2024 15:25:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1710170701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bHLMM6VOo42thQAgvftidBXfGDSJiFdOugL44M1CGn0=; b=OEcv+PhYpbpMG8EzgmI7H8jCQjKaYUvG0gs3XwcKmTvJSgqllCI8oFyOrXsDFX3PjB62Li r/+dtsZC4gz71xlDqJA6JhR8XnX8yrNVTO7Xc6UFU2Ja+cZXDVJnQhd7r/JDUgje4U4w+t A6rIYwpjMZnM0VIBCbH0Lb2HXfqxRA85MXtk9+o3B268v8czRQzIxvqYfOVieSYNBecKkY VOZNGBg6eS53YvAePOc2SWT//SpENUx6KQquaMtHPHcp6F7iDfy16a9GoS7vvqXeiy4dvq kK24sGiPq5NEzjFLcsJlndy4dkuHU8go4vtt3RA1Hh3xGu4Sj+iwUc9B74Vb+g== From: Luca Ceresoli Date: Mon, 11 Mar 2024 16:24:56 +0100 Subject: [PATCH 3/3] scripts/decode_stacktrace.sh: add '-h' flag 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="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240311-decode_stacktrace-find_module-improvements-v1-3-8bea42b421aa@bootlin.com> References: <20240311-decode_stacktrace-find_module-improvements-v1-0-8bea42b421aa@bootlin.com> In-Reply-To: <20240311-decode_stacktrace-find_module-improvements-v1-0-8bea42b421aa@bootlin.com> To: Konstantin Khlebnikov , Stephen Boyd , Sasha Levin , =?utf-8?q?Alexis_Lothor=C3=A9?= , Thomas Petazzoni , linux-kernel@vger.kernel.org, Luca Ceresoli X-Mailer: b4 0.13.0 X-GND-Sasl: luca.ceresoli@bootlin.com When no parameters are passed, the usage instructions are presented only when debuginfod-find is not found. This makes sense because with debuginfod none of the positional parameters are needed. However it means that users having debuginfod-find installed will have no chance of reading the usage text without opening the file. Many programs have a '-h' flag to get the usage, so add such a flag. Invoking 'scripts/decode_stacktrace.sh -h' will now show the usage text and exit. Signed-off-by: Luca Ceresoli --- scripts/decode_stacktrace.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh index b56e79060e9f..e8c9976062d0 100755 --- a/scripts/decode_stacktrace.sh +++ b/scripts/decode_stacktrace.sh @@ -7,6 +7,7 @@ usage() { echo "Usage:" echo " $0 -r " echo " $0 [ [|auto []]]" + echo " $0 -h" } # Try to find a Rust demangler @@ -32,7 +33,10 @@ fi READELF=${UTIL_PREFIX}readelf${UTIL_SUFFIX} ADDR2LINE=${UTIL_PREFIX}addr2line${UTIL_SUFFIX} -if [[ $1 == "-r" ]] ; then +if [[ $1 == "-h" ]] ; then + usage + exit 0 +elif [[ $1 == "-r" ]] ; then vmlinux="" basepath="auto" modpath="" -- 2.34.1