diff options
author | Pedro Alves <palves@redhat.com> | 2011-02-14 11:26:42 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2011-02-14 11:26:42 +0000 |
commit | 9fc6d940ae73525e1e3ef9332452926d18732b14 (patch) | |
tree | b65f26653f2d6ca3311d7536ae06fb160d6e877a /gdb/c-valprint.c | |
parent | 5467c6c807fb015675b2f1b7c2e012893b998d7c (diff) | |
download | gdb-9fc6d940ae73525e1e3ef9332452926d18732b14.zip gdb-9fc6d940ae73525e1e3ef9332452926d18732b14.tar.gz gdb-9fc6d940ae73525e1e3ef9332452926d18732b14.tar.bz2 |
gdb/
* c-valprint.c (c_val_print): Print a string with unavailable
contents as an array.
Diffstat (limited to 'gdb/c-valprint.c')
-rw-r--r-- | gdb/c-valprint.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index baad597..138aca6 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -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))) |