Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Handle var_zuinteger and var_zuinteger_unlimited from Python
Date: Mon, 30 Apr 2018 21:52:00 -0000	[thread overview]
Message-ID: <20180430215210.ngeru74jibhlgxul@adacore.com> (raw)
In-Reply-To: <20180426222003.9059-1-tom@tromey.com>

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  <tom@tromey.com>
> 
> 	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  <tom@tromey.com>
> 
> 	PR python/20084:
> 	* python.texi (Parameters In Python): Document PARAM_ZUINTEGER and
> 	PARAM_ZUINTEGER_UNLIMITED.
> 
> gdb/testsuite/ChangeLog
> 2018-04-26  Tom Tromey  <tom@tromey.com>
> 
> 	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


  parent reply	other threads:[~2018-04-30 21:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-26 22:20 Tom Tromey
2018-04-27  6:36 ` Eli Zaretskii
2018-05-02 16:01   ` Tom Tromey
2018-05-02 16:06     ` Tom Tromey
2018-05-02 16:26     ` Eli Zaretskii
2018-05-02 16:31       ` Tom Tromey
2018-04-30 21:52 ` Joel Brobecker [this message]
2018-05-02 16:05   ` Tom Tromey
2018-05-02 16:25     ` Joel Brobecker
2018-05-02 18:16 ` Pedro Alves
2018-05-02 21:07   ` Tom Tromey
2018-05-02 21:37     ` Pedro Alves

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=20180430215210.ngeru74jibhlgxul@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.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