public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Simon Marchi <simon.marchi@polymtl.ca>,
	gdb-patches@sourceware.org, Eli Zaretskii <eliz@gnu.org>
Subject: Re: [PATCH] [gdb/cli] Add command: show logging active
Date: Wed, 24 Nov 2021 12:06:42 +0100	[thread overview]
Message-ID: <899e1aa8-a887-770b-1417-982f9b5ff272@suse.de> (raw)
In-Reply-To: <77e5e956-8781-8cd3-27f8-83274412da1b@polymtl.ca>

On 11/23/21 2:30 PM, Simon Marchi wrote:
> 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.

Done (
https://sourceware.org/pipermail/gdb-patches/2021-November/183749.html
), though I see now that I've copied the "help doc" ;) .

Proposed a fixup here (
https://sourceware.org/pipermail/gdb-patches/2021-November/183759.html ).

Thanks,
- Tom


  reply	other threads:[~2021-11-24 11:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 11:46 [pushed] " Tom de Vries
2021-11-23 11:49 ` [PATCH] " Tom de Vries
2021-11-23 12:30   ` Lancelot SIX
2021-11-24 10:31     ` Tom de Vries
2021-11-23 13:00   ` Eli Zaretskii
2021-11-24 10:41     ` Tom de Vries
2021-11-24 13:03       ` Eli Zaretskii
2021-11-23 13:30   ` Simon Marchi
2021-11-24 11:06     ` Tom de Vries [this message]
2021-11-23 12:49 ` [pushed] " Luis Machado
2021-11-23 12:56   ` Luis Machado
2021-11-24 10:32     ` Tom de Vries

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=899e1aa8-a887-770b-1417-982f9b5ff272@suse.de \
    --to=tdevries@suse.de \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).