}
}
}
- else if (v->lval () != not_lval
- && v->deprecated_modifiable () == 0)
+ else if (v->lval () != not_lval && !v->deprecated_modifiable ())
return 0; /* These are values from the history (e.g., $1). */
else if (v->lval () == lval_register)
return 0; /* Cannot watch a register with a HW watchpoint. */
struct value *v = iter.get ();
/* Constants and values from the history are fine. */
- if (v->lval () == not_lval || v->deprecated_modifiable () == 0)
+ if (v->lval () == not_lval || !v->deprecated_modifiable ())
continue;
else if (v->lval () == lval_memory)
{
/* We preserve VALUE_LVAL so that the user can find out where it was fetched
from. This is a bit dubious, because then *&$1 does not just return $1
but the current contents of that location. c'est la vie... */
- set_modifiable (0);
+ set_modifiable (false);
value_history.push_back (release_value (this));
default:
new_kind = INTERNALVAR_VALUE;
struct value *copy = val->copy ();
- copy->set_modifiable (1);
+ copy->set_modifiable (true);
/* Force the value to be fetched from the target now, to avoid problems
later when this internalvar is referenced and the target is gone or
v = value::allocate (builtin_type (target_gdbarch ())->xmethod);
v->m_lval = lval_xcallable;
v->m_location.xm_worker = worker.release ();
- v->m_modifiable = 0;
+ v->m_modifiable = false;
return v;
}
/* Values can only be created via "static constructors". */
explicit value (struct type *type_)
- : m_modifiable (1),
+ : m_modifiable (true),
m_lazy (1),
m_initialized (1),
m_stack (0),
/* The comment from "struct value" reads: ``Is it modifiable? Only
relevant if lval != not_lval.''. Shouldn't the value instead be
not_lval and be done with it? */
- int deprecated_modifiable () const
+ bool deprecated_modifiable () const
{ return m_modifiable; }
/* Set or clear the modifiable flag. */
- void set_modifiable (int val)
+ void set_modifiable (bool val)
{ m_modifiable = val; }
LONGEST pointed_to_offset () const
enum lval_type m_lval = not_lval;
/* Is it modifiable? Only relevant if lval != not_lval. */
- unsigned int m_modifiable : 1;
+ bool m_modifiable : 1;
/* If zero, contents of this value are in the contents field. If
nonzero, contents are in inferior. If the lval field is lval_memory,