* c-valprint.c (c_val_print): Print a string with unavailable
	contents as an array.
This commit is contained in:
Pedro Alves 2011-02-14 11:26:42 +00:00
parent 5467c6c807
commit 9fc6d940ae
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2011-02-14 Pedro Alves <pedro@codesourcery.com>
* c-valprint.c (c_val_print): Print a string with unavailable
contents as an array.
2011-02-14 Pedro Alves <pedro@codesourcery.com>
* value.h (unpack_bits_as_long): Delete declaration.

View File

@ -187,6 +187,8 @@ c_val_print (struct type *type, const gdb_byte *valaddr,
long as the entire array is valid. */
if (c_textual_element_type (unresolved_elttype,
options->format)
&& value_bytes_available (original_value, embedded_offset,
TYPE_LENGTH (type))
&& value_bits_valid (original_value,
TARGET_CHAR_BIT * embedded_offset,
TARGET_CHAR_BIT * TYPE_LENGTH (type)))