Hello,
With AVR-Studio 4.1.16 and Gcc/Gdb, when using bit fields in a
structure, the watch window doesn't display values correctly.
If you have structure
typedef struct {
U8 ID:6;
U8 Flag:1;
U8 Length;
U8 Data[8];
U16 TimeStamp;
} tLINMessage;
it is packed on 12 bytes
when structure
typedef struct {
U8 ID;
U8 Flag:1;
U8 Length;
U8 Data[8];
U16 TimeStamp;
} tLINMessage;
is 13 bytes long
This may save space in the small chip
BUT
in second configuration debugger will display the values as they are (2
independant numbers) but in first one both elements of structure (ID and
flag) have the same value...
Is it a global bug of gdb or something specific to avr-gcc settings or
event avr-studio?
Regards
Erwan MARC
_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list