From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lndn.lancelotsix.com (vps-42846194.vps.ovh.net [IPv6:2001:41d0:801:2000::2400]) by sourceware.org (Postfix) with ESMTPS id D2C61385781E for ; Thu, 21 Oct 2021 22:23:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D2C61385781E Received: from ubuntu.lan (unknown [IPv6:2a02:390:9086::635]) by lndn.lancelotsix.com (Postfix) with ESMTPSA id 06C53819D4; Thu, 21 Oct 2021 22:23:58 +0000 (UTC) Date: Thu, 21 Oct 2021 22:23:54 +0000 From: Lancelot SIX To: Keith Seitz Cc: Aaron Merey , gdb-patches@sourceware.org Subject: Re: [PATCH 1/2] gdb: add set/show commands for managing debuginfod Message-ID: <20211021222202.4qinnfjktsmlp5a4@ubuntu.lan> References: <20211018230133.265619-1-amerey@redhat.com> <20211018230133.265619-2-amerey@redhat.com> <7eeed275-d442-fee2-4d5e-352c8ed34ec3@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7eeed275-d442-fee2-4d5e-352c8ed34ec3@redhat.com> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.11 (lndn.lancelotsix.com [0.0.0.0]); Thu, 21 Oct 2021 22:23:59 +0000 (UTC) X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_SBL_CSS, SPF_HELO_NONE, 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: Thu, 21 Oct 2021 22:24:01 -0000 > > 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 >