Suppose foo.cpp contains this:

      void foo()  {
         static struct {
            struct {
               virtual void func() {}
            } test1;
         } test2;
      }

If you compile this with gcc-3.4.2 and invoke gdb:

  g++ -g -c foo.cpp && gdb foo.o

gdb dies with:

  /gdb/dwarf2read.c:5000: internal-error: could not find partial DIE in cache
  A problem internal to GDB has been detected,
  further debugging may prove unreliable.

Honestly, I don't know if this is a bug in gcc or gdb, but I don't know how to 
find out.  Whichever it is, I bet there's something fishy about the name of a 
vtable for a nested function-local class.

    -Ken

-- 
           Summary: bad debug info for static nested struct with virtual
                    function
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kjd at duda dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-redhat-linux
  GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20830

Reply via email to