This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Handle var_zuinteger and var_zuinteger_unlimited from Python
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 2 May 2018 09:24:59 -0700
- Subject: Re: [RFA] Handle var_zuinteger and var_zuinteger_unlimited from Python
- References: <20180426222003.9059-1-tom@tromey.com> <20180430215210.ngeru74jibhlgxul@adacore.com> <87wowm59hu.fsf@tromey.com>
> 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;
That's also how I ended up reviewing the patch :).
> 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"
Looks good!
Thanks Tom,
--
Joel