[Qt-creator] Qt creator, gdb and anonymous unions.

Andre Poenitz andre.poenitz at mathematik.tu-chemnitz.de
Sun Feb 14 19:08:35 CET 2010


On Sun, Feb 14, 2010 at 09:38:26PM +0900, paulo wrote:
> Hi friends at the qt-creator mailing list.
> 
> I'm wondering if it's possible to get qt-creator debugger view to show 
> some anonymous unions the same way gdb does.
> 
> That is, for something like:
> struct A {
>     union {
>         struct { float b; };
>         struct { float c; };
>     };
> } a;
> 
> a.b = 0;
> 
> gdb will print p a:
> $1 = {{b = 0},{c = 0}}
> 
> on the other hand qt-creator just says it's an anonymous union and will 
> refuse to print visualize anything, making me add it by hand to the 
> watchers window (very annoying).

I works for a 'plain' anonymous union, but you have nested anonymous
structs, too. This is an oversight on my part, I'll have a look tomorrow.

Andre'



More information about the Qt-creator-old mailing list