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 328A3385DC1A for ; Tue, 26 Jan 2021 15:22:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 328A3385DC1A Received: from fencepost.gnu.org ([2001:470:142:3::e]:52705) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4QAt-0001y3-O5; Tue, 26 Jan 2021 10:22:35 -0500 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3824 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l4QAs-0000f2-Nl; Tue, 26 Jan 2021 10:22:35 -0500 Date: Tue, 26 Jan 2021 17:22:44 +0200 Message-Id: <83eei72057.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess Cc: gdb-patches@sourceware.org In-Reply-To: <99a396b1db7b7a6caacdcbd966236cd59fc6fc2b.1611653889.git.andrew.burgess@embecosm.com> (message from Andrew Burgess on Tue, 26 Jan 2021 09:48:12 +0000) Subject: Re: [PATCHv2 2/3] gdb: process startup files and startup command line options References: <99a396b1db7b7a6caacdcbd966236cd59fc6fc2b.1611653889.git.andrew.burgess@embecosm.com> X-Spam-Status: No, score=1.6 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Tue, 26 Jan 2021 15:22:37 -0000 > From: Andrew Burgess > Date: Tue, 26 Jan 2021 09:48:12 +0000 > > Adds the ability to process commands at a new phase during GDB's > startup. This phase is earlier than the current initialisation file > processing, before GDB has produced any output. Thanks. > +* GDB will now load and process commands from ~/.config/gdb/gdbstartup > + or ~/.gdbstartup if these files are present. These files are > + processed earlier than any of the previous initialization files and > + can affect parts of GDB's startup that previously had already been > + completed before the initialization files were read, for example > + styling of the initial GDB greeting. > + > +* GDB now has two new options "--startup-command" and > + "--startup-eval-command" with corresponding short options "-sx" and > + "-sex" that allow options (that would normally appear in a > + gdbstartup file) to be passed on the command line. This part is OK. > +@item -startup-command @var{file} > +@itemx -sx @var{file} > +@cindex @code{--startup-command} > +@cindex @code{-sx} > +Execute commands from file @var{file} as early as possible during the > +initialization process, before any output is produced. > +@xref{Startup}. > + > +@item -startup-eval-command @var{command} > +@itemx -sex @var{command} > +@cindex @code{--startup-eval-command} > +@cindex @code{-sex} > +Execute a single @value{GDBN} command as early as possible during the > +initialization process, before any output is produced. "As early as possible" could be taken as meaning there's something non-deterministic in choosing the stage where these commands are executed. How about "very early in the initialization process" instead? > +The files processed are split into two categories @dfn{startup files} > +and @dfn{initialization files}. > + > +The startup file is loaded as early as possible during The first sentence above says "files", the second says "the file", as if there's only one. Which one is it? (And the same issue with "as early as possible" as before.) > +@value{GDBN}'s startup, before the interpreter (@pxref{Interpreters}) > +has been initialised, and before the default target (@pxref{Targets} > +is initialised. Only @code{set} or @code{source} commands should be Our convention is to use the US English spellings, so please use "initialized". > +restrictions. Only commands that can appear in a startup file shold ^^^^^ A typo there. > +While on Apple hosts the locations searched are: Such a sentence shouldn't start with "while". I suggest "By contrast," instead.