On 02/15/2013 01:27 PM, Yao Qi wrote:
-int remote_hw_watchpoint_limit = -1;
-int remote_hw_watchpoint_length_limit = -1;
-int remote_hw_breakpoint_limit = -1;
+static unsigned int remote_hw_watchpoint_limit = UINT_MAX;
+static unsigned int remote_hw_watchpoint_length_limit = UINT_MAX;
+static unsigned int remote_hw_breakpoint_limit = UINT_MAX;
...
@@ -8259,7 +8255,7 @@ remote_check_watch_resources (int type, int cnt, int ot)
{
if (remote_hw_watchpoint_limit == 0)
return 0;
- else if (remote_hw_watchpoint_limit < 0)
+ else if (remote_hw_watchpoint_limit == UINT_MAX)
This made me notice something with var_zuinteger_unlimited.
What's the point of making it work with unsigned variables,
and UINT_MAX, if the contents of the variable are actually
treated as int everywhere in cli-setshow.c? (and val is
still cut at INT_MAX). Vis, e.g.,