diff options
author | Kung Hsu <kung@cygnus> | 1993-11-06 01:32:11 +0000 |
---|---|---|
committer | Kung Hsu <kung@cygnus> | 1993-11-06 01:32:11 +0000 |
commit | 024f65b1800f3882845e0e92e75ffd5dbf08ec9d (patch) | |
tree | 6815aa36fae24a579bc36d798bccd6435ecf5c41 /gdb/cp-valprint.c | |
parent | 0cb95a9c27efe5ec7c5f9db6e3bbd1862041167c (diff) | |
download | gdb-024f65b1800f3882845e0e92e75ffd5dbf08ec9d.zip gdb-024f65b1800f3882845e0e92e75ffd5dbf08ec9d.tar.gz gdb-024f65b1800f3882845e0e92e75ffd5dbf08ec9d.tar.bz2 |
Modified Files:
gdbtypes.h stabsread.c cp-valprint.c ChangeLog
* gdbtypes.h : add a field 'ignore_field_bits in cplus_specific,
and macros to handle the bits.
* stabsread.c (read_one_struct_field): add VISIBILITY_IGNORE, and
for field of length 0, set this bit on.
* cp-valprint.c (cp_print_value_fields): for VISIBILITY_IGNORE
field, print <no value>.
Diffstat (limited to 'gdb/cp-valprint.c')
-rw-r--r-- | gdb/cp-valprint.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c index cce1f19..806687e 100644 --- a/gdb/cp-valprint.c +++ b/gdb/cp-valprint.c @@ -296,17 +296,31 @@ cp_print_value_fields (type, valaddr, stream, format, recurse, pretty, /* Bitfields require special handling, especially due to byte order problems. */ - v = value_from_longest (TYPE_FIELD_TYPE (type, i), + if (TYPE_FIELD_IGNORE (type, i)) + { + fputs_filtered ("<no value>", stream); + } + else + { + v = value_from_longest (TYPE_FIELD_TYPE (type, i), unpack_field_as_long (type, valaddr, i)); - c_val_print (TYPE_FIELD_TYPE (type, i), VALUE_CONTENTS (v), 0, + c_val_print (TYPE_FIELD_TYPE(type, i), VALUE_CONTENTS (v), 0, stream, format, 0, recurse + 1, pretty); + } } else { - c_val_print (TYPE_FIELD_TYPE (type, i), + if (TYPE_FIELD_IGNORE (type, i)) + { + fputs_filtered ("<no value>", stream); + } + else + { + c_val_print (TYPE_FIELD_TYPE (type, i), valaddr + TYPE_FIELD_BITPOS (type, i) / 8, 0, stream, format, 0, recurse + 1, pretty); + } } } if (pretty) |