From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id aE/uE/GOXGfK9RUAWB0awg (envelope-from ) for ; Fri, 13 Dec 2024 14:45:53 -0500 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=Vmd4zOFP; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 4E2091E097; Fri, 13 Dec 2024 14:45:53 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable autolearn_force=no version=4.0.0 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id E01D51E091 for ; Fri, 13 Dec 2024 14:45:52 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8B5C83858D39 for ; Fri, 13 Dec 2024 19:45:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B5C83858D39 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=Vmd4zOFP Received: from omta034.useast.a.cloudfilter.net (omta034.useast.a.cloudfilter.net [44.202.169.33]) by sourceware.org (Postfix) with ESMTPS id BC2ED3858D21 for ; Fri, 13 Dec 2024 19:45:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BC2ED3858D21 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BC2ED3858D21 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734119116; cv=none; b=I4bprcS0Q9rV6zowXN2L3IspmGAQhsVr0ENMmiRMrKvDwT4HOLTRHaAqfBzD2Dq2tkYDg+eeCtMDppiXYygroKU8RbTv7ml1bw2nnatK8T287WdoHb1aMzzByLjtXnGIhuJL2iQx7ZxEmmdR3BCVcGgie7WdsY+RJlgsik41kbQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734119116; c=relaxed/simple; bh=EmVayoiYDHpAMu2/s9DWAvuanzDa9iD1vHyvNgcpwlM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=rFWlXfwHBnMhhHzSJLmF5jNMd3JlPbajMVcGKAITPnRBgsbeceDXxsy95ILETShKSAPYZx5KuoEbGOIEKlhzV2MJnWZM+P9dTg/D3DPtz6TqXVMRSZ9Fbb4xNR1Atny5kgMuNKZ1TFjS8ji96WqmWYqBcvQAbsgCz5XD5cq/N7Q= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BC2ED3858D21 Received: from eig-obgw-6003a.ext.cloudfilter.net ([10.0.30.151]) by cmsmtp with ESMTPS id M5k3tH8H2rKrbMBbAtBDrw; Fri, 13 Dec 2024 19:45:16 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id MBb9tQ86ICgT6MBb9t0MV2; Fri, 13 Dec 2024 19:45:15 +0000 X-Authority-Analysis: v=2.4 cv=XvwxOkF9 c=1 sm=1 tr=0 ts=675c8ecb a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=RZcAm9yDv7YA:10 a=ItBw4LHWJt0A:10 a=20KFwNOVAAAA:8 a=BYtjGRY8dWPsjcq-KjoA:9 a=6Ogn3jAGHLSNbaov7Orx:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=JfcVTdGAoJAZoonaJxUC2xCKAFB9/iHj+ROSnyFNFLY=; b=Vmd4zOFPxPYifAQ5NKINSFCCO5 8JEgkeo8w6ZlhLSaa2Fy3pwaiqb4C3LqRcedbm8axiRdWdL0053SSVDZVtVACIJSDEilNz+o+RFEJ PEHejBVFdqB2KDbp7PlwZt+iN; Received: from 97-122-113-155.hlrn.qwest.net ([97.122.113.155]:48504 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1tMBb8-0019f3-32; Fri, 13 Dec 2024 12:45:14 -0700 From: Tom Tromey To: Keith Seitz Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v2] Add gstack script In-Reply-To: <08a19a3debe4a1e3c6072a807e79566277a7c0dc.1734022384.git.keiths@redhat.com> (Keith Seitz's message of "Thu, 12 Dec 2024 13:07:41 -0800") References: <08a19a3debe4a1e3c6072a807e79566277a7c0dc.1734022384.git.keiths@redhat.com> X-Attribution: Tom Date: Fri, 13 Dec 2024 12:45:14 -0700 Message-ID: <87seqre59x.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.113.155 X-Source-L: No X-Exim-ID: 1tMBb8-0019f3-32 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-113-155.hlrn.qwest.net (murgatroyd) [97.122.113.155]:48504 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfPM5sqaNhEIU5wsNeM6wRFsJwcDGOPsSnEkyCky1+SrBuJwb5Rln4Rn9m9E+HPPfzotpebDDk1No0vE7pkksz5qCL5h6Rvfb2vJB3f9x7Yyf9jHs5eji iEcSUixHfCfe5g9GP+nDxmxLDvDRGPZUKnMsJeXUmPn7Tb6W1mFvYDkFvb6b5XHVM4g2W1JKo4Jug4TFy++YfW+S+q06c+/sfp0= X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org >>>>> "Keith" == Keith Seitz writes: Keith> The script includes suggestions from gdb/32325 to include Keith> versioning and help. [If this approach to gdb/32325 is acceptable, Keith> I could propagate the solution to gcore/gdb-add-index.] This would be super. Keith> +function print_try_help() { Keith> + echo "Try '$0 --help' for more information." This should probably print to stderr. Keith> +function print_help() { Keith> + print_usage Here, print_usage should print to stdout. So maybe this later spot: Keith> +# The sole remaining argument should be the PID of the process Keith> +# whose backtrace is desired. Keith> +if [ $# -ne 1 ]; then Keith> + print_usage ... should redirect to stderr. Keith> +define attach-bt Keith> +attach \$arg0 Keith> +echo "ATTACHED" Keith> +thread apply all bt Keith> +end Keith> +attach-bt $PID I'm curious to understand why this is wrapped in a 'define'. Tom