From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127279 invoked by alias); 30 Oct 2019 19:43:56 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 127088 invoked by uid 89); 30 Oct 2019 19:43:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: us-smtp-1.mimecast.com Received: from us-smtp-delivery-1.mimecast.com (HELO us-smtp-1.mimecast.com) (205.139.110.120) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 30 Oct 2019 19:43:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572464633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hHpu83m/e3BYcunR+dd6u6jRc4bL7Nk0rromd/SCDBc=; b=dau/iDJXnNur0xsK7FMm6Tue/GCr9y6yleAV9gsCmw9aP6ch78KtqLo1duOJFphIPCykfn BFwSeNdvj4yf4Lacf5H/25s+d+FIsbbX6T7Bj70Hg2FMIhlIBMPwn/COD7zwCwnGNoUTCz avrqOYrfkRGpWVuTrvIcGECbeoIb8n8= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-22-gMEik1c5Pf-BOWkTJed4xw-1; Wed, 30 Oct 2019 15:43:51 -0400 Received: by mail-wr1-f72.google.com with SMTP id k10so1895001wrl.22 for ; Wed, 30 Oct 2019 12:43:51 -0700 (PDT) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:56ee:75ff:fe8d:232b? ([2001:8a0:f913:f700:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id r1sm1148179wrw.60.2019.10.30.12.43.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Oct 2019 12:43:49 -0700 (PDT) Subject: Re: [RFAv5 1/3] Implement convenience functions to examine GDB settings. To: Philippe Waroquiers , gdb-patches@sourceware.org References: <20190915185314.19875-1-philippe.waroquiers@skynet.be> <20190915185314.19875-2-philippe.waroquiers@skynet.be> From: Pedro Alves Message-ID: <8cf802d6-3b61-714d-3afe-c844ccf08190@redhat.com> Date: Wed, 30 Oct 2019 19:43:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20190915185314.19875-2-philippe.waroquiers@skynet.be> X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2019-10/txt/msg01114.txt.bz2 On 9/15/19 7:53 PM, Philippe Waroquiers wrote: > void > _initialize_cli_cmds (void) > { > @@ -2049,6 +2241,44 @@ abbreviations for commands and/or values. E.g.:\n\ > set_cmd_completer_handle_brkchars (c, with_command_completer); > add_com_alias ("w", "with", class_vars, 1); >=20=20 > + add_internal_function ("_gdb_setting_str", _("\ > +$_gdb_setting_str - returns the value of a GDB setting as a string.\n\ > +Usage: $_gdb_setting_str (setting)\n\ > +\n\ > +auto-boolean values are \"off\", \"on\", \"auto\".\n\ > +boolean values are \"off\", \"on\".\n\ > +The unlimited value for integer, uinteger, zuinteger-unlimited\n\ > +settings is represented as \"unlimited\"."), I wonder what users will think of these=20 integer, uinteger, zuinteger-unlimited, etc. references. I mean, these are internal setting types, we don't describe them anywhere, right? Maybe the description here should be closer to the manual description, telling users to loop at the documentation of each setting to know which values to use. > + gdb_setting_str_internal_fn, NULL); > + > + add_internal_function ("_gdb_setting", _("\ > +$_gdb_setting - returns the value of a GDB setting.\n\ > +Usage: $_gdb_setting (setting)\n\ > +auto-boolean values are \"off\", \"on\", \"auto\".\n\ > +boolean values are \"off\", \"on\".\n\ > +The unlimited value for integer, uinteger settings is 0.\n\ > +The unlimited value for zuinteger-unlimited is -1."), "for zuinteger-unlimited settings", I suppose. Same thing appears in other places below. Otherwise LGTM. Thanks, Pedro Alves