diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2015-07-28 11:01:50 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2015-07-28 11:01:50 -0400 |
commit | e512cdbdffafefa63baeb835ba6636fcef56e17d (patch) | |
tree | 3d1ebb4988fa11cae9461cc8e0dcaa4a2fa9f21a /gdb/value.c | |
parent | 3723fda829671b273d7b31a0753bb1fa8f614cb6 (diff) | |
download | gdb-e512cdbdffafefa63baeb835ba6636fcef56e17d.zip gdb-e512cdbdffafefa63baeb835ba6636fcef56e17d.tar.gz gdb-e512cdbdffafefa63baeb835ba6636fcef56e17d.tar.bz2 |
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.
Diffstat (limited to 'gdb/value.c')
-rw-r--r-- | gdb/value.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/value.c b/gdb/value.c index 7fb7e2b..0d540d5 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -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) { |