Author Topic: C: Watchlist says "There is no member named ..." erroneously.  (Read 5510 times)

Offline Napoleon

  • Multiple posting newcomer
  • *
  • Posts: 59
[Ubuntu 13.10, CB 13.12 from source]

I'm doing an assignment using gnu99 C.  In it I have a struct defined in a header file I'm including in my current project.  I'm using a pointer variable to point at an instance created using malloc().
When my program stops at a breakpoint, I can't see the contents of the structure's members in the watch list.

The watchlist correctly identifies the struct name the pointer is associated with, however it cannot be expanded to view its member values.
When I try to watch buffer->entries, the watchlist displays "There is no member named entries." in the value column.

In my source, the tooltip that pops up when I hover over the member's name shows:   "entries | No symbol 'entries' in current context.".

I've tried dereferencing, typecasting, but nothing I can think of works. (When I'm debugging a C++ project, then do I get the "+" symbol next to objects.)

Would someone please explain what's going on and how to do this correctly?

Cheers,
Nap
« Last Edit: May 12, 2014, 09:49:49 am by Napoleon »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: C: Watchlist says "There is no member named ..." erroneously.
« Reply #1 on: May 12, 2014, 10:28:21 am »
Read this: http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks

Most probably you've compiled you project without symbols.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Napoleon

  • Multiple posting newcomer
  • *
  • Posts: 59
Re: C: Watchlist says "There is no member named ..." erroneously.
« Reply #2 on: May 12, 2014, 11:23:03 am »
thanks oBFusCATed,  I guess I missed a few points in my OP.

I have the [-g] option set in the build options for the target I'm working with.
All the simple variables show ok, the problem only exists with Structs.

I've had a look at that page before I posted.