This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Handle var_zuinteger and var_zuinteger_unlimited from Python


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]