This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gdb/51: gdb dies in varobj.c: c_type_of_child - "Child of parent whose type does not allow children."



>Number:         51
>Category:       gdb
>Synopsis:       gdb dies in varobj.c: c_type_of_child - "Child of parent whose type does not allow children."
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 01 14:58:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     dr@netscape.com
>Release:        snapshot insight+dejagnu-20010427
>Organization:
>Environment:
platform: i686, linux 2.2.16-22 (redhat 7.0)
compiler: gcc-2.96-81 (rpm)
>Description:
We die in the following code:

static struct type *
c_type_of_child (struct varobj *parent, int index)
{
  struct type *type;
  char *name = name_of_child (parent, index);

  switch (TYPE_CODE (parent->type))
    {
    /* ... */

    default:
      /* This should not happen as only the above types have children */
      warning ("Child of parent whose type does not allow children");
      /* FIXME: Can we still go on? */
      type = NULL;
      break;
    }

  return type;
}
>How-To-Repeat:
I'm using insight. Inspecting the tree of local variables in scope, insight gives me the option to expand (void*) typed pointers. When I click on the (+) widget to see the data for that variable, I get this message.

Insight probably shouldn't be giving me this option in the first place, but I think that may be a different bug.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]