From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 96178 invoked by alias); 30 Apr 2018 21:52:17 -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 96165 invoked by uid 89); 30 Apr 2018 21:52:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=brain, surprisingly X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Apr 2018 21:52:14 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id DBB811173AE; Mon, 30 Apr 2018 17:52:12 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id njKeNVRVNhcz; Mon, 30 Apr 2018 17:52:12 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id AC28711720B; Mon, 30 Apr 2018 17:52:12 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id E248C83055; Mon, 30 Apr 2018 14:52:10 -0700 (PDT) Date: Mon, 30 Apr 2018 21:52:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFA] Handle var_zuinteger and var_zuinteger_unlimited from Python Message-ID: <20180430215210.ngeru74jibhlgxul@adacore.com> References: <20180426222003.9059-1-tom@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180426222003.9059-1-tom@tromey.com> User-Agent: NeoMutt/20170113 (1.7.2) X-SW-Source: 2018-04/txt/msg00668.txt.bz2 Hi Tom, > PR python/20084 points out that the Python API doesn't handle the > var_zuinteger and var_zuinteger_unlimited parameter types. > > This patch adds support for these types. > > Regression tested on x86-64 Fedora 26. > > gdb/ChangeLog > 2018-04-26 Tom Tromey > > PR python/20084: > * python/python.c (gdbpy_parameter_value): Handle var_zuinteger > and var_zuinteger_unlimited. > * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER > and PARAM_ZUINTEGER_UNLIMITED. > (set_parameter_value): Handle var_zuinteger and > var_zuinteger_unlimited. > (add_setshow_generic): Likewise. > (parmpy_init): Likewise. > > gdb/doc/ChangeLog > 2018-04-26 Tom Tromey > > PR python/20084: > * python.texi (Parameters In Python): Document PARAM_ZUINTEGER and > PARAM_ZUINTEGER_UNLIMITED. > > gdb/testsuite/ChangeLog > 2018-04-26 Tom Tromey > > PR python/20084: > * gdb.python/py-parameter.exp: Add PARAM_ZUINTEGER and > PARAM_ZUINTEGER_UNLIMITED tests. This patch looks good to me, and you can push as is. It was surprisingly harder to read (I picked this patch as a way to spend my time constructively, while I wait for a build to finish ;-)), in particular the part with the fall through in the case statement, but that's probably me having a slightly different type of brain... I managed to convince myself that the patch looks correct to me. One thought: How about testing the value of the setting after setting its value to -1? -- Joel