diff options
author | Pedro Alves <palves@redhat.com> | 2011-02-14 11:10:53 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2011-02-14 11:10:53 +0000 |
commit | 4e07d55ffbd3d926ab776b2ce3fd13e96d214269 (patch) | |
tree | 3760a8a1660d71a45eaa57121fa577baa79b4115 /gdb/value.h | |
parent | 498cd2a0fdc89ee9a81ce4ad0019d64a1f6dbcd7 (diff) | |
download | gdb-4e07d55ffbd3d926ab776b2ce3fd13e96d214269.zip gdb-4e07d55ffbd3d926ab776b2ce3fd13e96d214269.tar.gz gdb-4e07d55ffbd3d926ab776b2ce3fd13e96d214269.tar.bz2 |
Base support for <unavailable> value contents.
gdb/
* value.h (value_bytes_available): Declare.
(mark_value_bytes_unavailable): Declare.
* value.c (struct range): New struct.
(range_s): New typedef.
(ranges_overlap): New function.
(range_lessthan): New function.
(ranges_contain_p): New function.
(struct value) <unavailable>: New field.
(value_bytes_available): New function.
(mark_value_bytes_unavailable): New function.
(require_not_optimized_out): Constify parameter.
(require_available): New function.
(value_contents_all, value_contents): Require all bytes be
available.
(value_free): Free `unavailable'.
(value_copy): Copy `unavailable'.
* valprint.h (val_print_unavailable): Declare.
* valprint.c (valprint_check_validity): Rename `offset' parameter
to `embedded_offset'. If printing a scalar, check whether the
value chunk is available.
(val_print_unavailable): New.
(val_print_scalar_formatted): Check whether the value is
available.
* python/py-prettyprint.c (apply_val_pretty_printer): Refuse
pretty-printing unavailable values.
Diffstat (limited to 'gdb/value.h')
-rw-r--r-- | gdb/value.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/value.h b/gdb/value.h index aa8ff3c..d51567e 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -360,6 +360,20 @@ extern int value_bits_valid (const struct value *value, extern int value_bits_synthetic_pointer (const struct value *value, int offset, int length); +/* Given a value, determine whether the contents bytes starting at + OFFSET and extending for LENGTH bytes are available. This returns + nonzero if all bytes in the given range are available, zero if any + byte is unavailable. */ + +extern int value_bytes_available (const struct value *value, + int offset, int length); + +/* Mark VALUE's content bytes starting at OFFSET and extending for + LENGTH bytes as unavailable. */ + +extern void mark_value_bytes_unavailable (struct value *value, + int offset, int length); + #include "symtab.h" |