2005-02-07 Andrew Cagney <cagney@gnu.org>
+ * value.h (value_next): Declare.
+ * value.c (value_next): Define.
+ * breakpoint.c: Update.
+
* value.h (deprecated_set_value_modifiable)
(deprecated_value_modifiable): Declare.
* value.c (deprecated_set_value_modifiable): Define.
the next time the watchpoint is inserted. */
for (v = b->owner->val_chain; v; v = n)
{
- n = v->next;
+ n = value_next (v);
value_free (v);
}
b->owner->val_chain = NULL;
bpt->inserted = 1;
/* Look at each value on the value chain. */
- for (; v; v = v->next)
+ for (; v; v = value_next (v))
{
/* If it's a memory location, and GDB actually needed
its contents to evaluate the expression, then we
b->inserted = (is == mark_inserted);
/* Walk down the saved value chain. */
- for (v = b->owner->val_chain; v; v = v->next)
+ for (v = b->owner->val_chain; v; v = value_next (v))
{
/* For each memory reference remove the watchpoint
at that address. */
if (!target_stopped_data_address (¤t_target, &addr))
continue;
- for (v = b->val_chain; v; v = v->next)
+ for (v = b->val_chain; v; v = value_next (v))
{
if (VALUE_LVAL (v) == lval_memory
&& ! value_lazy (v))
function calls are special in any way. So this function may not
notice that an expression involving an inferior function call
can't be watched with hardware watchpoints. FIXME. */
- for (; v; v = v->next)
+ for (; v; v = value_next (v))
{
if (VALUE_LVAL (v) == lval_memory)
{
};
+/* Values are stored in a chain, so that they can be deleted easily
+ over calls to the inferior. Values assigned to internal variables
+ or put into the value history are taken off this list. */
+struct value *value_next (struct value *);
+
extern struct type *value_type (struct value *);
/* This is being used to change the type of an existing value, that
code should instead be creating a new value with the changed type