forked from Imagelibrary/binutils-gdb
Change watchpoint_exp_is_const to return bool
I noticed that watchpoint_exp_is_const should return bool; this patch implements this change. gdb/ChangeLog 2020-11-21 Tom Tromey <tom@tromey.com> * breakpoint.c (watchpoint_exp_is_const): Return bool.
This commit is contained in:
@@ -10084,7 +10084,7 @@ break_range_command (const char *arg, int from_tty)
|
||||
some constant expressions and in such case still falsely return
|
||||
zero. */
|
||||
|
||||
static int
|
||||
static bool
|
||||
watchpoint_exp_is_const (const struct expression *exp)
|
||||
{
|
||||
int i = exp->nelts;
|
||||
@@ -10177,7 +10177,7 @@ watchpoint_exp_is_const (const struct expression *exp)
|
||||
if (SYMBOL_CLASS (s) != LOC_BLOCK
|
||||
&& SYMBOL_CLASS (s) != LOC_CONST
|
||||
&& SYMBOL_CLASS (s) != LOC_CONST_BYTES)
|
||||
return 0;
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -10185,11 +10185,11 @@ watchpoint_exp_is_const (const struct expression *exp)
|
||||
the optimistic approach here: If we don't know something,
|
||||
then it is not a constant. */
|
||||
default:
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Watchpoint destructor. */
|
||||
|
||||
Reference in New Issue
Block a user