Re: Memory woes



Ok, about gdb not seeing your single bitfield member;
it's a bug with the debugger... has to be.

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.

I dont think there is a standard behavior for
this. usualy setting an unsigned int to -1 yeilds
INT_MAX or UINT_MAX (I think so ... not shure though)

anyway. the point is that you cant assign -1 to an
unsigned bit. TRUE is almost always defined as `-1'.



Cheers,
                -Tristan


Rico wrote:

--- Tristan Van Berkom <vantr touchtunes com> wrote:
               <snip for brevity>
anyhow... I'm sure you've got enough information to proceed. (pretty cool
feature for the C compiler ;D )

Hi Tristan! First of all, thanks for all the info. However, if there was a hint
in there regarding my main problem, i.e why at some places gdb doesn't see
_no_fetch_on_load as a member of the Group whilst it sees the other 2 guint
members of the struct, well I didn't get it. In the following:
*****************************************************************************
static void
switch_to_group (gpointer callobj, gpointer callarg, gpointer client)
{
        Group * group = GROUP (client);
        gboolean  tmp = group->_no_fetch_on_load;

        group->_no_fetch_on_load = TRUE;
72      if (group->article_qty > 0)
                articlelist_set_group (group);

        group->_no_fetch_on_load = tmp;

}
*****************************************************************************
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!!!
Worse, inside articlelist_set_group(), that member simply disappears as far
as gdb is concerned. But the compiler didn't complain when I dereferenced it.

If anyone is willing to help me track down this bug, let me know, I'll post
the patch to Pan-0.13.3.93 that I've got so far and you'll get to try and
see if the problem replicates itself.

Thanks.
Rico.

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]