X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fada-varobj.c;h=267ee2668bd6fa3ba057a138466a3c29813b1799;hb=afa0a4115985939f242bcd54211c98345eefe16b;hp=34d9c7b342635b99088847c7f7bd34eebf047c48;hpb=d7e747318f4d04af033f16325f9b6d74f67079ec;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/ada-varobj.c b/gdb/ada-varobj.c index 34d9c7b342..267ee2668b 100644 --- a/gdb/ada-varobj.c +++ b/gdb/ada-varobj.c @@ -929,7 +929,7 @@ ada_value_of_variable (const struct varobj *var, /* Implement the "value_is_changeable_p" routine for Ada. */ -static int +static bool ada_value_is_changeable_p (const struct varobj *var) { struct type *type = var->value ? value_type (var->value) : var->type; @@ -939,7 +939,7 @@ ada_value_is_changeable_p (const struct varobj *var) { /* This is in reality a pointer to an unconstrained array. its value is changeable. */ - return 1; + return true; } if (ada_is_string_type (type)) @@ -947,7 +947,7 @@ ada_value_is_changeable_p (const struct varobj *var) /* We display the contents of the string in the array's "value" field. The contents can change, so consider that the array is changeable. */ - return 1; + return true; } return varobj_default_value_is_changeable_p (var); @@ -955,11 +955,10 @@ ada_value_is_changeable_p (const struct varobj *var) /* Implement the "value_has_mutated" routine for Ada. */ -static int +static bool ada_value_has_mutated (const struct varobj *var, struct value *new_val, struct type *new_type) { - int i; int from = -1; int to = -1; @@ -967,7 +966,7 @@ ada_value_has_mutated (const struct varobj *var, struct value *new_val, has mutated. */ if (ada_varobj_get_number_of_children (new_val, new_type) != var->num_children) - return 1; + return true; /* If the number of fields have remained the same, then we need to check the name of each field. If they remain the same, @@ -983,13 +982,13 @@ ada_value_has_mutated (const struct varobj *var, struct value *new_val, has mutated or not. So just assume it hasn't. */ varobj_restrict_range (var->children, &from, &to); - for (i = from; i < to; i++) + for (int i = from; i < to; i++) if (ada_varobj_get_name_of_child (new_val, new_type, var->name.c_str (), i) - != VEC_index (varobj_p, var->children, i)->name) - return 1; + != var->children[i]->name) + return true; - return 0; + return false; } /* varobj operations for ada. */