Similar to get_type_arch, used to get the gdbarch associated to a
struct value.
gdb/ChangeLog:
* value.c (get_value_arch): New function.
* value.h (get_value_arch): New declaration.
+2015-07-28 Simon Marchi <simon.marchi@ericsson.com>
+
+ * value.c (get_value_arch): New function.
+ * value.h (get_value_arch): New declaration.
+
2015-07-28 Simon Marchi <simon.marchi@ericsson.com>
* value.c (struct value): Update comments.
VEC(range_s) *optimized_out;
};
+/* See value.h. */
+
+struct gdbarch *
+get_value_arch (const struct value *value)
+{
+ return get_type_arch (value_type (value));
+}
+
int
value_bits_available (const struct value *value, int offset, int length)
{
extern struct type *value_type (const struct value *);
+/* Return the gdbarch associated with the value. */
+
+extern struct gdbarch *get_value_arch (const struct value *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
(but possibly shared content). */