From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 53A64385141D for ; Fri, 3 Jun 2022 17:05:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 53A64385141D Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-213-y50r_ExAPKCKPzAYQU3JrA-1; Fri, 03 Jun 2022 13:05:11 -0400 X-MC-Unique: y50r_ExAPKCKPzAYQU3JrA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 87CB6858EEE for ; Fri, 3 Jun 2022 17:05:11 +0000 (UTC) Received: from f35-1.lan (unknown [10.2.17.206]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2F7543323E; Fri, 3 Jun 2022 17:05:11 +0000 (UTC) From: Kevin Buettner To: gdb-patches@sourceware.org Subject: [PATCH v2] Document how GDB searches for files when using -s, -e, and -se options Date: Fri, 3 Jun 2022 10:04:43 -0700 Message-Id: <20220603170443.192296-1-kevinb@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 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 17:05:16 -0000 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 a cross reference to the file command for these options. --- gdb/doc/gdb.texinfo | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 5f09f3a1433..aad7c79c248 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -962,6 +962,11 @@ If @value{GDBN} has not been configured to included core file support, such as for most embedded targets, then it will complain about a second argument and ignore it. +For the @samp{-s}, @samp{-e}, and @samp{-se} options, and their long +form equivalents, the method used to search the file system for the +symbol and/or executable file is the same as that used by the +@code{file} command. @xref{Files, ,file}. + Many options have both long and short forms; both are shown in the following list. @value{GDBN} also recognizes the long forms if you truncate them, so long as enough of the option is present to be unambiguous. -- 2.35.3