From ec0a52e16206a31867fdcc5535c42baca7bf8967 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Mon, 14 Feb 2011 11:33:24 +0000 Subject: gdb/testsuite/ * gdb.trace/unavailable.cc (struct Virtual): New. (virtualp): New global pointer. * gdb.trace/unavailable.exp (gdb_collect_globals_test): Test printing a pointer to an object whose type has a vtable, with print object on. gdb/ * value.h (value_entirely_available): Declare. * value.c (value_entirely_available): New function. * c-valprint.c (c_value_print): Don't try fetching the pointer's real type if the pointer is unavailable. --- gdb/value.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdb/value.h') diff --git a/gdb/value.h b/gdb/value.h index 4dec28e..b5e77fd 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -368,6 +368,10 @@ extern int value_bits_synthetic_pointer (const struct value *value, extern int value_bytes_available (const struct value *value, int offset, int length); +/* Like value_bytes_available, but return false if any byte in the + whole object is unavailable. */ +extern int value_entirely_available (struct value *value); + /* Mark VALUE's content bytes starting at OFFSET and extending for LENGTH bytes as unavailable. */ -- cgit v1.1