Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Tom Tromey <tom@tromey.com>,  gdb-patches@sourceware.org
Subject: Re: [RFA] Handle var_zuinteger and var_zuinteger_unlimited from Python
Date: Wed, 02 May 2018 16:05:00 -0000	[thread overview]
Message-ID: <87wowm59hu.fsf@tromey.com> (raw)
In-Reply-To: <20180430215210.ngeru74jibhlgxul@adacore.com> (Joel Brobecker's	message of "Mon, 30 Apr 2018 14:52:10 -0700")

>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:

Joel> This patch looks good to me, and you can push as is. It was surprisingly
Joel> harder to read (I picked this patch as a way to spend my time constructively,
Joel> while I wait for a build to finish ;-)), in particular the part with
Joel> the fall through in the case statement, but that's probably me having
Joel> a slightly different type of brain... I managed to convince myself
Joel> that the patch looks correct to me.

Yeah, that bit is really unclear in the patch, but clearer (IMO) in the
code:

	  case var_uinteger:
	    if (l == 0)
	      l = UINT_MAX;
	    /* Fall through.  */
	  case var_zuinteger:
	    ok = (l >= 0 && l <= UINT_MAX);
	    break;

Joel> One thought: How about testing the value of the setting after setting
Joel> its value to -1?

I've added a test like so:

	gdb_test "python print(gdb.parameter('test-$kind'))" "-1" \
	    "check that PARAM_ZUINTEGER value is -1 after setting"

Tom


  reply	other threads:[~2018-05-02 16:05 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
2018-05-02 16:05   ` Tom Tromey [this message]
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=87wowm59hu.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /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