From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 1E8C0383E690 for ; Fri, 27 May 2022 17:49:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1E8C0383E690 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36128) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nue51-0007WF-V7; Fri, 27 May 2022 13:48:59 -0400 Received: from [87.69.77.57] (port=3920 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 1nue50-00077F-TD; Fri, 27 May 2022 13:48:55 -0400 Date: Fri, 27 May 2022 20:48:51 +0300 Message-Id: <83r14en9x8.fsf@gnu.org> From: Eli Zaretskii To: Tom Tromey Cc: gdb-patches@sourceware.org In-Reply-To: <20220527173642.1180218-1-tromey@adacore.com> (message from Tom Tromey via Gdb-patches on Fri, 27 May 2022 11:36:42 -0600) Subject: Re: [PATCH] Add gdb.current_language function References: <20220527173642.1180218-1-tromey@adacore.com> X-Spam-Status: No, score=1.5 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, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Fri, 27 May 2022 17:49:01 -0000 > Date: Fri, 27 May 2022 11:36:42 -0600 > From: Tom Tromey via Gdb-patches > Cc: Tom Tromey > > This adds the gdb.current_language function, which can be used to find > the current language without (1) ever having the value "auto" or (2) > having to parse the output of "show language". > --- > gdb/NEWS | 4 ++++ > gdb/doc/python.texi | 6 ++++++ > gdb/python/python.c | 12 ++++++++++++ > gdb/testsuite/gdb.python/py-parameter.exp | 13 +++++++++++++ > 4 files changed, 35 insertions(+) Thanks. > + ** New function gdb.current_language() that returns the name of the Please remove the "()" part, it is not needed there, and can be misinterpreted. > +@defun gdb.current_language () > +Return the name of the current language as a string. Note that, > +unlike @code{gdb.parameter(language')}, this function will never ^^ A quote missing there. The documentation parts are okay with these nits fixed.