From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 7FB95384B0C3 for ; Fri, 3 Jun 2022 05:34:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7FB95384B0C3 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47804) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwzxX-0006ro-T5; Fri, 03 Jun 2022 01:34:55 -0400 Received: from [87.69.77.57] (port=4773 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwzxX-0007Am-Bk; Fri, 03 Jun 2022 01:34:55 -0400 Date: Fri, 03 Jun 2022 08:35:06 +0300 Message-Id: <83bkvae2d1.fsf@gnu.org> From: Eli Zaretskii To: Kevin Buettner Cc: gdb-patches@sourceware.org In-Reply-To: <20220602224040.139421-1-kevinb@redhat.com> (message from Kevin Buettner via Gdb-patches on Thu, 2 Jun 2022 15:40:40 -0700) Subject: Re: [PATCH] Document how GDB searches for files when using -s, -e, and -se options References: <20220602224040.139421-1-kevinb@redhat.com> X-Spam-Status: No, score=1.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jun 2022 05:34:57 -0000 > Date: Thu, 2 Jun 2022 15:40:40 -0700 > From: Kevin Buettner via Gdb-patches > > GDB's documentation of the 'file' command says: > > If you do not specify a directory and the file is not found in the > GDB working directory, GDB uses the environment variable PATH as a > list of directories to search, just as the shell does when looking > for a program to run. > > The same is true for files specified via commandline options -s, -e, > and -se. > > This commit adds similar text to the section of the manual which > discusses these commandline options. Thanks. I don't think we need to repeat the same description in the "File Options" section, we just need to mention this shortly and add a cross-reference to where the 'file' command's description explains that. > +For the @samp{-s}, @samp{-e}, and @samp{-se} options, and their long > +form equivalents, if @var{file} does not specify a directory as a > +component of the filename and the file is not found in the > +@value{GDBN} working directory, @value{GDBN} uses the environment > +variable @env{PATH} as a list of directories to search, just as the > +shell does when looking for a program to run. The search algorithm > +used for these options is identical to that used by the > +@code{symbol-file}, @code{exec-file}, and @code{file} commands. Could you please rewrite the above to be shorter and have a cross-reference?