mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-02-08 18:28:33 +00:00
* valprint.c (val_print_type_code_flags): Fix for bitfields larger
than 32 bits.
This commit is contained in:
parent
76b7178d0d
commit
befae75944
@ -1,5 +1,8 @@
|
||||
2006-08-22 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
* valprint.c (val_print_type_code_flags): Fix for bitfields larger
|
||||
than 32 bits.
|
||||
|
||||
* gdbtypes.c (init_flags_type): Set all fields to zero instead of
|
||||
just the first one.
|
||||
|
||||
|
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user