[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Memory woes
- From: Rico <ras_kalb yahoo com>
- To: gtk-app-devel-list gnome org
- Subject: Re: Memory woes
- Date: Wed, 26 Feb 2003 08:16:43 -0800 (PST)
Hi Tristan!
--- Tristan Van Berkom <vantr@touchtunes.com> wrote:
> Ok, about gdb not seeing your single bitfield member;
> it's a bug with the debugger... has to be.
As it turns out, it's not the fault of gdb here either.
It's not a bug, it's a feature of the compiler that gives the debugger a bad
name: optimisation.
Removing the -O2 flag made things clearer. I also have a thread synchronization
issue that I missed in there.
> > I'd set a breakpoint at line 72. I am stumped to have gdb tell me that
> > group->_no_fetch_on_load is 0 at this point!!!
>
> This is probably not the fault of gdb.
>
> uint var:1 = -1; // <-- makes no sense at all.
> a single bit unsigned is either 0 or 1; not -1.
> TRUE is almost always defined as `-1'.
As you said, TRUE is defined as !FALSE, which is just that, not-FALSE which
means non-zero, and here, 1. It's the thread synchronization issue that caused
groups[x]->_no_load_on_fetch to be seen as FALSE despite previously setting to
TRUE.
Thanks again for the info about the size setting.
Rico.
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]