+2016-04-08 Martin Galvan <martin.galvan@tallertechnologies.com>
+
+ * value.c (value_next): Make pass-by-reference parameters const-correct.
+ (value_parent): Likewise.
+ (value_enclosing_type): Likewise.
+ (value_lazy): Likewise.
+ (value_stack): Likewise.
+ (value_embedded_offset): Likewise.
+ (value_pointed_to_offset): Likewise.
+ (value_raw_address): Likewise.
+ (deprecated_value_modifiable): Likewise.
+ (value_free_to_mark): Likewise.
+ (value_release_to_mark): Likewise.
+ (internalvar_name): Likewise.
+ (readjust_indirect_value_type): Likewise.
+ (value_initialized): Likewise.
+ * value.h (value_next): Likewise.
+ (value_parent): Likewise.
+ (value_enclosing_type): Likewise.
+ (value_lazy): Likewise.
+ (value_stack): Likewise.
+ (value_embedded_offset): Likewise.
+ (value_pointed_to_offset): Likewise.
+ (value_raw_address): Likewise.
+ (deprecated_value_modifiable): Likewise.
+ (value_free_to_mark): Likewise.
+ (value_release_to_mark): Likewise.
+ (internalvar_name): Likewise.
+ (readjust_indirect_value_type): Likewise.
+ (value_initialized): Likewise.
+
2016-04-07 Yao Qi <yao.qi@linaro.org>
* record-full.c (record_full_insert_breakpoint): Return
/* Accessor methods. */
struct value *
-value_next (struct value *value)
+value_next (const struct value *value)
{
return value->next;
}
}
struct value *
-value_parent (struct value *value)
+value_parent (const struct value *value)
{
return value->parent;
}
}
struct type *
-value_enclosing_type (struct value *value)
+value_enclosing_type (const struct value *value)
{
return value->enclosing_type;
}
}
int
-value_lazy (struct value *value)
+value_lazy (const struct value *value)
{
return value->lazy;
}
}
int
-value_stack (struct value *value)
+value_stack (const struct value *value)
{
return value->stack;
}
}
int
-value_embedded_offset (struct value *value)
+value_embedded_offset (const struct value *value)
{
return value->embedded_offset;
}
}
int
-value_pointed_to_offset (struct value *value)
+value_pointed_to_offset (const struct value *value)
{
return value->pointed_to_offset;
}
}
CORE_ADDR
-value_raw_address (struct value *value)
+value_raw_address (const struct value *value)
{
if (value->lval == lval_internalvar
|| value->lval == lval_internalvar_component
}
int
-deprecated_value_modifiable (struct value *value)
+deprecated_value_modifiable (const struct value *value)
{
return value->modifiable;
}
/* Free all values allocated since MARK was obtained by value_mark
(except for those released). */
void
-value_free_to_mark (struct value *mark)
+value_free_to_mark (const struct value *mark)
{
struct value *val;
struct value *next;
/* Release all values up to mark */
struct value *
-value_release_to_mark (struct value *mark)
+value_release_to_mark (const struct value *mark)
{
struct value *val;
struct value *next;
}
char *
-internalvar_name (struct internalvar *var)
+internalvar_name (const struct internalvar *var)
{
return var->name;
}
struct value *
readjust_indirect_value_type (struct value *value, struct type *enc_type,
- struct type *original_type,
- struct value *original_value)
+ const struct type *original_type,
+ const struct value *original_value)
{
/* Re-adjust type. */
deprecated_set_value_type (value, TYPE_TARGET_TYPE (original_type));
/* Return the initialized field in a value struct. */
int
-value_initialized (struct value *val)
+value_initialized (const struct value *val)
{
return val->initialized;
}
put into the value history or exposed to Python are taken off this
list. */
-struct value *value_next (struct value *);
+struct value *value_next (const struct value *);
/* Type of the value. */
single read from the target when displaying multiple
bitfields. */
-struct value *value_parent (struct value *);
+struct value *value_parent (const struct value *);
extern void set_value_parent (struct value *value, struct value *parent);
/* Describes offset of a value within lval of a structure in bytes.
relevant if lval != not_lval.''. Shouldn't the value instead be
not_lval and be done with it? */
-extern int deprecated_value_modifiable (struct value *value);
+extern int deprecated_value_modifiable (const struct value *value);
/* If a value represents a C++ object, then the `type' field gives the
object's compile-time type. If the object actually belongs to some
`type', and `embedded_offset' is zero, so everything works
normally. */
-extern struct type *value_enclosing_type (struct value *);
+extern struct type *value_enclosing_type (const struct value *);
extern void set_value_enclosing_type (struct value *val,
struct type *new_type);
int resolve_simple_types,
int *real_type_found);
-extern int value_pointed_to_offset (struct value *value);
+extern int value_pointed_to_offset (const struct value *value);
extern void set_value_pointed_to_offset (struct value *value, int val);
-extern int value_embedded_offset (struct value *value);
+extern int value_embedded_offset (const struct value *value);
extern void set_value_embedded_offset (struct value *value, int val);
/* For lval_computed values, this structure holds functions used to
element. If you ever change the way lazy flag is set and reset, be
sure to consider this use as well! */
-extern int value_lazy (struct value *);
+extern int value_lazy (const struct value *);
extern void set_value_lazy (struct value *value, int val);
-extern int value_stack (struct value *);
+extern int value_stack (const struct value *);
extern void set_value_stack (struct value *value, int val);
/* Throw an error complaining that the value has been optimized
/* Set or return field indicating whether a variable is initialized or
not, based on debugging information supplied by the compiler.
1 = initialized; 0 = uninitialized. */
-extern int value_initialized (struct value *);
+extern int value_initialized (const struct value *);
extern void set_value_initialized (struct value *, int);
/* Set COMPONENT's location as appropriate for a component of WHOLE
/* Like value_address, except the result does not include value's
offset. */
-extern CORE_ADDR value_raw_address (struct value *);
+extern CORE_ADDR value_raw_address (const struct value *);
/* Set the address of a value. */
extern void set_value_address (struct value *, CORE_ADDR);
extern struct value * readjust_indirect_value_type (struct value *value,
struct type *enc_type,
- struct type *original_type,
- struct value *original_val);
+ const struct type *original_type,
+ const struct value *original_val);
/* Convert a REF to the object referenced. */
extern struct value *value_mark (void);
-extern void value_free_to_mark (struct value *mark);
+extern void value_free_to_mark (const struct value *mark);
extern struct value *value_cstring (const char *ptr, ssize_t len,
struct type *char_type);
struct ui_file *stream, int format,
enum val_prettyformat pretty);
-extern struct value *value_release_to_mark (struct value *mark);
+extern struct value *value_release_to_mark (const struct value *mark);
extern void val_print (struct type *type, const gdb_byte *valaddr,
int embedded_offset, CORE_ADDR address,
extern void typedef_print (struct type *type, struct symbol *news,
struct ui_file *stream);
-extern char *internalvar_name (struct internalvar *var);
+extern char *internalvar_name (const struct internalvar *var);
extern void preserve_values (struct objfile *);