Introduce get_value_arch

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.
This commit is contained in:
Simon Marchi
2015-07-28 11:01:50 -04:00
parent 3723fda829
commit e512cdbdff
3 changed files with 17 additions and 0 deletions

View File

@ -340,6 +340,14 @@ struct value
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)
{