public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Lancelot SIX <lsix@lancelotsix.com>
To: Keith Seitz <keiths@redhat.com>
Cc: Aaron Merey <amerey@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] gdb: add set/show commands for managing debuginfod
Date: Thu, 21 Oct 2021 22:23:54 +0000	[thread overview]
Message-ID: <20211021222202.4qinnfjktsmlp5a4@ubuntu.lan> (raw)
In-Reply-To: <7eeed275-d442-fee2-4d5e-352c8ed34ec3@redhat.com>

> 
> Just a question for others: Is this the normal style used in GDB? E.g., the
> python command is always available:
> (gdb) python print(1)
> Python scripting is not supported in this copy of GDB.
> 
> Like command/command-line options, I'd like us to be vigilant of consistency.
> [Maybe that's just my personal thing, though.]
> 
> It's just a question -- I am not asking for any changes.

Hi,

From what I can tell, the usage is usually to have the commands always
present, but act as a noop (while maybe still printing a warning to the
user) when the feature is not built into GDB.  I think some commands
would also force the value to become off if they detect the support is
missing (see gdb_internal_backtrace_set_cmd for an example).

One argument for this is that it allows the commands to be placed in
scripts (such as .gdbinit for example) and not cause an error when
executing script if the command is missing.  This would result in
subsequent commands in the script to be ignored which could be
unfortunate.  If the command is turned into a noop it is easier to have
just one portable gdbinit file shared across deployment.

That being said, this is just my personal view on the subject, I’ll let
maintainers tell if there is a guideline to follow.

Best,
Lancelot.
> 
> With the safe_strerror change, though, I recommend a maintainer review
> this patch for final approval(s).
> 
> Keith
> 


  reply	other threads:[~2021-10-21 22:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 23:01 [PATCH 0/2 v3] gdb: Add debuginfod first-use notification Aaron Merey
2021-10-18 23:01 ` [PATCH 1/2] gdb: add set/show commands for managing debuginfod Aaron Merey
2021-10-20 20:34   ` Keith Seitz
2021-10-21 22:23     ` Lancelot SIX [this message]
2021-10-25 22:30       ` Aaron Merey
2021-10-21 22:02   ` Lancelot SIX
2021-10-26 16:08   ` Simon Marchi
2021-10-28 22:18     ` Aaron Merey
2021-10-29  1:47       ` Simon Marchi
2021-10-30  1:09         ` Aaron Merey
2021-10-30  1:54           ` Simon Marchi
2021-10-31  2:43             ` Simon Marchi
2021-11-01 15:52               ` Simon Marchi
2021-11-01 17:39                 ` Aaron Merey
2021-11-01 18:00                   ` Simon Marchi
2021-11-02 16:51                     ` Simon Marchi
2021-11-02 20:35                       ` Aaron Merey
2021-10-18 23:01 ` [PATCH 2/2] gdb.texinfo: Expand documentation for debuginfod Aaron Merey
2021-10-19 11:17   ` Eli Zaretskii
2021-10-19 22:35     ` Aaron Merey
2021-10-20 11:38       ` Eli Zaretskii
2021-10-30  1:18         ` Aaron Merey
2021-10-30  6:57           ` 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=20211021222202.4qinnfjktsmlp5a4@ubuntu.lan \
    --to=lsix@lancelotsix.com \
    --cc=amerey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=keiths@redhat.com \
    /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).