From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 5D8BE3857825 for ; Wed, 24 Nov 2021 10:32:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5D8BE3857825 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 5F0E82195A; Wed, 24 Nov 2021 10:32:38 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 43FC613F05; Wed, 24 Nov 2021 10:32:38 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id C4x5D8YUnmEwZwAAMHmgww (envelope-from ); Wed, 24 Nov 2021 10:32:38 +0000 Subject: Re: [pushed] [gdb/cli] Add command: show logging active To: Luis Machado , gdb-patches@sourceware.org, Eli Zaretskii References: <20211123114603.6284-1-tdevries@suse.de> <1ca7c4e3-7db2-264c-8c71-8ff51ea5640a@linaro.org> <72143ae1-7b7f-7359-2e4a-ca74142194b9@linaro.org> From: Tom de Vries Message-ID: Date: Wed, 24 Nov 2021 11:32:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <72143ae1-7b7f-7359-2e4a-ca74142194b9@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Wed, 24 Nov 2021 10:32:40 -0000 On 11/23/21 1:56 PM, Luis Machado wrote: > On 11/23/21 9:49 AM, Luis Machado wrote: >> On 11/23/21 8:46 AM, Tom de Vries via Gdb-patches wrote: >>> Currently, there's no gdb command that shows whether logging is >>> enabled or >>> disabled. >>> >>> There's the show logging command, but output is identical in both cases. >>> With logging disabled, we have: >>> ... >>> (gdb) set logging off >>> (gdb) show logging >>> logging debugredirect:  The logging output mode is off. >>> logging file:  The current logfile is "gdb.txt". >>> logging overwrite: \ >>>    Whether logging overwrites or appends to the log file is off. >>> logging redirect:  The logging output mode is off. >>> ... >>> and with logging enabled we have: >>> ... >>> (gdb) set logging on >>> Copying output to gdb.txt. >>> Copying debug output to gdb.txt. >>> (gdb) show logging >>> logging debugredirect:  The logging output mode is off. >>> logging file:  The current logfile is "gdb.txt". >>> logging overwrite: \ >>>    Whether logging overwrites or appends to the log file is off. >>> logging redirect:  The logging output mode is off. >>> ... >>> >>> Add a "show logging active" command, such that we have: >>> ... >>> (gdb) show logging >>> logging active:  Logging is disabled. >>> logging debugredirect:  The logging output mode is off. >>> logging file:  The current logfile is "gdb.txt". >>> logging overwrite: \ >>>    Whether logging overwrites or appends to the log file is off. >>> logging redirect:  The logging output mode is off. >>> ... >> >> Sorry, I think these phrases need a revamp. The current text is very >> confusing. I've cc-ed Eli for some feedback on documentation. >> >> "logging active:  Logging is disabled." reads very funny. Is logging >> active? Or is it disabled? Why can't it say "Logging is active" or >> "Logging is not active"? >> >> I think the same goes to some of the other lines. >> >> * "logging debugredirect:  The logging output mode is off." >> >> Why not say "Debug is not being redirected." or "Debug is being >> redirected."? >> >> * "logging overwrite: Whether logging overwrites or appends to the log >> file is off." >> >> Why not say "Logging overwrites contents of the log file" or "Logging >> appends to the log file". >> >> * "logging redirect:  The logging output mode is off." >> >> I find the above cryptic as well. Why not "Log redirects ". > > I just noticed these messages changed relatively recently. An older GDB > would show the following: > > Future logs will be written to gdb.txt. > Logs will be appended to the log file. > Output will be logged and displayed. > Debug output will be logged and displayed. > > The above is much clearer in my opinion. The newer ones seem very > cryptic. It almost looks like a documentation regression, though I can > understand that the code is probably simpler. I've tried to address these issues here ( https://sourceware.org/pipermail/gdb-patches/2021-November/183750.html ). Thanks, - Tom