From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x933.google.com (mail-ua1-x933.google.com [IPv6:2607:f8b0:4864:20::933]) by sourceware.org (Postfix) with ESMTPS id B0CC73858033 for ; Tue, 23 Nov 2021 12:49:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B0CC73858033 Received: by mail-ua1-x933.google.com with SMTP id t13so43409755uad.9 for ; Tue, 23 Nov 2021 04:49:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zvzClyPPmDYIan7h29Ro2oaG1yg+TspZrNVjLss7XLQ=; b=JdOiXO1v2Wg9TBhesxwMoh6t73Xahd5gGY8a7AGnMEhKuApJvljUpTIhA0g8JVTJsO bBaZENMwGn2UFrfCvm2fbsMIcn+w1VRGsVy0UjloGDed3+60JbzfaajVaFCIrku2Ypf0 03+TI1Al1clgq7SjXL5DnLHG6zHL5rrfrQwqkoyPnkmbSIqxHNJVSBZjFAZsSt9HjSWa 6dOTtNatulsk9LTuG7Hjdfr3L5V6DerM3nJRBOhsb6oD2tCgIeJxYOTeud6nCnDf5Oyp l38F7pUsYZkNDZvokYtQfrx+XaZlrFBSyvF4WlpGtS5zzImKPfJknMB3TgYfxrurqYeM N8Gw== X-Gm-Message-State: AOAM530LfuDzrF/OIvv5T/hbsZTIF1tpoy4zHTvG+U9NY00PGZiwHo+9 Yz2DqCg4Aqn73e50wQleCHnRAqZGW8Ep3w== X-Google-Smtp-Source: ABdhPJyaAWV9+Ltd7YgUmMR7i0RCP0xS9DdKBymGHC//Vwo/W6wd/5wC56Effsa2KRpivtlq4J02Mw== X-Received: by 2002:a05:6102:5492:: with SMTP id bk18mr9220771vsb.18.1637671745194; Tue, 23 Nov 2021 04:49:05 -0800 (PST) Received: from ?IPv6:2804:7f0:4841:5563:567:f743:51a3:5cfa? ([2804:7f0:4841:5563:567:f743:51a3:5cfa]) by smtp.gmail.com with ESMTPSA id r24sm3618855vsn.1.2021.11.23.04.49.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Nov 2021 04:49:04 -0800 (PST) Subject: Re: [pushed] [gdb/cli] Add command: show logging active To: Tom de Vries , gdb-patches@sourceware.org, Eli Zaretskii References: <20211123114603.6284-1-tdevries@suse.de> From: Luis Machado Message-ID: <1ca7c4e3-7db2-264c-8c71-8ff51ea5640a@linaro.org> Date: Tue, 23 Nov 2021 09:49:02 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20211123114603.6284-1-tdevries@suse.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, 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: Tue, 23 Nov 2021 12:49:07 -0000 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 ".