From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 0AB9C3858D28 for ; Tue, 23 Nov 2021 13:30:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0AB9C3858D28 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 1ANDUlQi003747 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 23 Nov 2021 08:30:52 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 1ANDUlQi003747 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 82E511EDEE; Tue, 23 Nov 2021 08:30:47 -0500 (EST) Message-ID: <77e5e956-8781-8cd3-27f8-83274412da1b@polymtl.ca> Date: Tue, 23 Nov 2021 08:30:47 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [PATCH] [gdb/cli] Add command: show logging active Content-Language: en-US To: Tom de Vries , gdb-patches@sourceware.org, Eli Zaretskii References: <20211123114603.6284-1-tdevries@suse.de> <9ab6df29-2990-704c-ea96-6af09d2e9a1e@suse.de> From: Simon Marchi In-Reply-To: <9ab6df29-2990-704c-ea96-6af09d2e9a1e@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Tue, 23 Nov 2021 13:30:47 +0000 X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, 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: Tue, 23 Nov 2021 13:31:00 -0000 On 2021-11-23 06:49, Tom de Vries via Gdb-patches wrote: > [was: [pushed] [gdb/cli] Add command: show logging active ] > > Sorry, this has not been pushed yet, correcting $subject to request review. > > Thanks, > - Tom > > On 11/23/21 12:46 PM, 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. >> ... >> >> Mention the new command in NEWS and docs. >> >> Tested on x86_64-linux. This looks a whole lot like what we discussed for "set debuginfod" and "set index-cache" recently. See: https://sourceware.org/pipermail/gdb-patches/2021-October/182937.html We then made the following changes. Add the "set index-cache enabled on/off" setting, and make "set index-cache on/off" deprecated aliases of that: https://gitlab.com/gnutools/binutils-gdb/-/commit/7bc5c369fae6dda3657467aee14e352a66b4270f Change "set debuginfod on/off" to "set debuginfod enabled on/off", without aliases because it was never released: https://gitlab.com/gnutools/binutils-gdb/-/commit/333f35b6315f6ed71db4fb76bfc1ebb7ec347d43 So, I would suggest doing the same as I did with index-cache, make "set logging on/off" deprecated aliases of a new "set logging enabled on/off" setting. Simon