AVR-Studio / Watch window and bit fields

View: New views
4 Messages — Rating Filter:   Alert me  

AVR-Studio / Watch window and bit fields

by Erwan MARC-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Re: AVR-Studio / Watch window and bit fields

by Joerg Wunsch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Erwan MARC <emarc@...> wrote:

> Is it a global bug of gdb or something specific to avr-gcc settings
> or event avr-studio?

Since you are talking about a "watch window", I think you are
referring to AVR Studio as the debugger, rather than AVR-GDB.  So if
the bitfields aren't displayed correctly, it sounds like an AVR Studio
bug then.  If you can confirm this with a minimal example, please file
a bug report.

--
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@...
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Re: AVR-Studio / Watch window and bit fields

by Erwan MARC-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That's right: it is not yet clear in my mind what is for AVRStudio and
what is for gcc.
With the structure I proposed in my first message, create tLINMessage
MyData and the fill in the bit fields to see what is displayed.
I'll try to prepare next week a simple example, with screenshots of what
I see.
Where is the place to fill the bug report?
Regards

E .MARC

Joerg Wunsch a écrit :

> Erwan MARC <emarc@...> wrote:
>
>  
>> Is it a global bug of gdb or something specific to avr-gcc settings
>> or event avr-studio?
>>    
>
> Since you are talking about a "watch window", I think you are
> referring to AVR Studio as the debugger, rather than AVR-GDB.  So if
> the bitfields aren't displayed correctly, it sounds like an AVR Studio
> bug then.  If you can confirm this with a minimal example, please file
> a bug report.
>
>  



_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@...
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

RE: AVR-Studio / Watch window and bit fields

by Stu Bell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Where is the place to fill the bug report?

Send reports of problems with AVR Studio to avr-at-atmel.com (replace
the -at- with @).

Best regards,

Stu Bell
DataPlay (DPHI, Inc.)


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@...
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list