From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id jxOHFAioLmAnUgAAWB0awg (envelope-from ) for ; Thu, 18 Feb 2021 12:46:48 -0500 Received: by simark.ca (Postfix, from userid 112) id 4AE2F1EF7C; Thu, 18 Feb 2021 12:46:48 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id EA4C71EE39 for ; Thu, 18 Feb 2021 12:46:47 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 27F62398881B; Thu, 18 Feb 2021 17:46:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 27F62398881B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1613670407; bh=81YGv7YZt6+KMZlh2DadMj7mO5rcyKWO6ZBS/7Zej2k=; h=Date:To:In-Reply-To:Subject:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=VtsOYQNXlQb9d0Pbsobhyz48uqnVtbyVl9xlJkp3iKRKqQIzr/5hKAdnR5fO/CHC7 Hvk8alN0UZwAztpX9mqz05XxgZzB9cOHlS56ZF+1j4+K4C+k8K33tq2CV+HmLhgT9N zKauJFS+wan2RC4wGi0HpxXYxw+WSmL0w07DSYvM= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 5F5043988826 for ; Thu, 18 Feb 2021 17:46:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5F5043988826 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47125) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCnNz-00017B-UD; Thu, 18 Feb 2021 12:46:43 -0500 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4772 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lCnNy-0007eJ-Kg; Thu, 18 Feb 2021 12:46:43 -0500 Date: Thu, 18 Feb 2021 19:46:55 +0200 Message-Id: <831rdd5kvk.fsf@gnu.org> To: Andrew Burgess In-Reply-To: (message from Andrew Burgess on Thu, 18 Feb 2021 16:41:03 +0000) Subject: Re: [PATCHv3 2/3] gdb: process early initialization files and command line options References: 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: , From: Eli Zaretskii via Gdb-patches Reply-To: Eli Zaretskii Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" > From: Andrew Burgess > Date: Thu, 18 Feb 2021 16:41:03 +0000 > > gdb/ChangeLog: > > PR cli/25956 > * NEWS: Mention new early init files and command line options. > * config.in: Regenerate. > * configure: Regenerate. > * configure.ac: Define GDBEARLYINIT. > * main.c (get_earlyinit_files): New function. > (enum cmdarg_kind): Add CMDARG_EARLYINIT_FILE and > CMDARG_EARLYINIT_COMMAND. > (captured_main_1): Add support for new command line flags, and for > processing startup files. > (print_gdb_help): Include startup files in the output. > < > gdb/doc/ChangeLog: > > PR cli/25956 > * gdb.texinfo (File Options): Mention new command line options. > (Startup): Discuss when early init files are processed. > (Initialization Files): Add description of early init files. > (Output Styling): Update description of 'version' style. > (gdb man): Mention early init files. > > gdb/testsuite/ChangeLog: > > PR cli/25956 > * gdb.base/early-init-file.c: New file. > * gdb.base/early-init-file.exp: New file. > * lib/gdb-utils.exp (style): Handle style 'none'. Thanks. > +* GDB will now load and process commands from ~/.config/gdb/gdbearlyinit > + or ~/.gdbearlyinit if these files are present. These files are > + processed earlier than any of the previous initialization files and ^^^^^^^^ "Previous" is confusing here, since they are actually processed _after_ .gdbearlyinit. I suggest "any of the other initialization files" instead. > +@item -early-init-command @var{file} > +@itemx -eix @var{file} > +@cindex @code{--early-init-command} > +@cindex @code{-eix} > +Execute commands from file @var{file} very early in the initialization It is generally better to say Execute commands from @var{file} thus avoiding identical words one after the other. When the name in @var describes itself, there's no need to have the description as separate text. > +process, before any output is produced. @xref{Startup}. > + > +@item -early-init-eval-command @var{command} > +@itemx -eiex @var{command} > +@cindex @code{--early-init-eval-command} > +@cindex @code{-eiex} > +Execute a single @value{GDBN} command very early in the initialization > +process, before any output is produced. @xref{Startup}. You have here two identical cross-references with only a handful of lines between them. I'd lose the second one, as it's redundant here. > +@item > +Performs minimal setup required to initialise basic internal state. ^^^^^^^^^^ "initialize", in US spelling, per our conventions. > +@cindex early initialization file > +Read commands from the early initialization file (if any) in your home ^^^^ "Reads", to be consistent with the other items in this list. > +directory. Only a restricted set of commands can be placed into an > +early initialization file, @pxref{Initialization Files} for details. This usage of @pxref is problematic: @pxref generally produces a period after the cross reference, and that looks as a mistake when the sentence doesn't end there. So I suggest this instead: early initialization file, see @ref{Initialization Files}, for details. (Note the comma after the closing brace.) > +Executes commands and command files specified by the @samp{-eiex} and > +@samp{-eix} command line options in their specified order. Only a > +restricted set of commands can be used with @samp{-eiex} and > +@samp{eix}, @pxref{Initialization Files} for details. Same here. > +The @dfn{early initialization} file is loaded very early in > +@value{GDBN}'s initialization process, before the interpreter Whenever you introduce a term, which is indicated by the use of @dfn, it is a good idea to have a @cindex entry for that term, so that readers could easily find this basic description of the term. > +In contrast, the @dfn{general initialization} files are processed > +later, after @value{GDBN} has finished its own internal initialization Same here. > +Throughout the rest of this document the term @dfn{initialization > +file} refers to one of the general initialization files, not the early And here.