summaryrefslogtreecommitdiff
path: root/gdb/value.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/value.c')
-rw-r--r--gdb/value.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/value.c b/gdb/value.c
index 09ab1bb4e2d..d96c07b10cd 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -353,6 +353,26 @@ value_entirely_available (struct value *value)
return 0;
}
+int
+value_entirely_unavailable (struct value *value)
+{
+ /* We can only tell whether the whole value is available when we try
+ to read it. */
+ if (value->lazy)
+ value_fetch_lazy (value);
+
+ if (VEC_length (range_s, value->unavailable) == 1)
+ {
+ struct range *t = VEC_index (range_s, value->unavailable, 0);
+
+ if (t->offset == 0
+ && t->length == TYPE_LENGTH (value_enclosing_type (value)))
+ return 1;
+ }
+
+ return 0;
+}
+
void
mark_value_bytes_unavailable (struct value *value, int offset, int length)
{