diff options
author | Mark Kettenis <kettenis@gnu.org> | 2006-08-22 20:32:39 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2006-08-22 20:32:39 +0000 |
commit | befae7594447817538b52dfa8980abaeab924cec (patch) | |
tree | f96a80aa2fc7bcc862bd80ed2a64b90b2f521629 /gdb/valprint.c | |
parent | 76b7178d0d06a730a1bddf6ee00a73984c2a2261 (diff) | |
download | gdb-befae7594447817538b52dfa8980abaeab924cec.zip gdb-befae7594447817538b52dfa8980abaeab924cec.tar.gz gdb-befae7594447817538b52dfa8980abaeab924cec.tar.bz2 |
* valprint.c (val_print_type_code_flags): Fix for bitfields larger
than 32 bits.
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r-- | gdb/valprint.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c index d730917..4f834f2 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -341,13 +341,14 @@ void val_print_type_code_flags (struct type *type, const gdb_byte *valaddr, struct ui_file *stream) { - LONGEST val = unpack_long (type, valaddr); + ULONGEST val = unpack_long (type, valaddr); int bitpos, nfields = TYPE_NFIELDS (type); fputs_filtered ("[ ", stream); for (bitpos = 0; bitpos < nfields; bitpos++) { - if (TYPE_FIELD_BITPOS (type, bitpos) != -1 && (val & (1 << bitpos))) + if (TYPE_FIELD_BITPOS (type, bitpos) != -1 && + (val & ((ULONGEST)1 << bitpos))) { if (TYPE_FIELD_NAME (type, bitpos)) fprintf_filtered (stream, "%s ", TYPE_FIELD_NAME (type, bitpos)); |