|
From: | Erwan MARC |
Subject: | [avr-gcc-list] AVR-Studio / Watch window and bit fields |
Date: | Thu, 16 Jul 2009 15:26:59 +0200 |
User-agent: | Thunderbird 2.0.0.22 (Windows/20090605) |
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 BUTin 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
[Prev in Thread] | Current Thread | [Next in Thread] |