Re: [CODE]Strange gdb behaviour - passing bad pointers.

From: Welcor (welcor@dune.net)
Date: 07/18/01


----- Original Message -----
From: "Mike Breuer" <mbreuer@NEW.RR.COM>
>
> You don't supply the definition, but I assume G_SKILLS is something like this:
>
> #define G_SKILLS(g) ((g)->skills)
>
Right.

> Assuming that is correct, The only reasonable explanation is that there is
> something wrong with your skills linked list.  Are you remembering to
> initialize it to 0?  Are you remembering to set the next pointer to 0 when you
> add to the end of the list (including when you add the first element)?  Take a
> look at the code that assembles your lists, the problem is obviously there.
>
I've found the problem, and it was just as you said. Things went bad when
I removed an item from the list, causing a lot of strange things. Amongst
them, the strange gdb output.

Thanks

Welcor

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST