From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [209.51.188.92]) by sourceware.org (Postfix) with ESMTPS id 525263858422 for ; Tue, 23 Nov 2021 13:00:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 525263858422 Received: from [2001:470:142:3::e] (port=44302 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpVPS-0004xp-S2; Tue, 23 Nov 2021 08:00:30 -0500 Received: from [87.69.77.57] (port=2296 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpVPS-00041q-IC; Tue, 23 Nov 2021 08:00:30 -0500 Date: Tue, 23 Nov 2021 15:00:41 +0200 Message-Id: <83a6hvowli.fsf@gnu.org> From: Eli Zaretskii To: Tom de Vries Cc: gdb-patches@sourceware.org In-Reply-To: <9ab6df29-2990-704c-ea96-6af09d2e9a1e@suse.de> (message from Tom de Vries on Tue, 23 Nov 2021 12:49:34 +0100) Subject: Re: [PATCH] [gdb/cli] Add command: show logging active References: <20211123114603.6284-1-tdevries@suse.de> <9ab6df29-2990-704c-ea96-6af09d2e9a1e@suse.de> X-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no 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:00:33 -0000 > From: Tom de Vries > Date: Tue, 23 Nov 2021 12:49:34 +0100 > > > 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. > > ... Isn't the current behavior a bug that should be fixed, instead of introducing a new command? Or what am I missing? The documentation part is OK, assuming that we do want a new sub-command. Thanks.