This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug debug/80490] New: -gsplit-dwarf: top namespace info seems to be lost in GDB


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80490

            Bug ID: 80490
           Summary: -gsplit-dwarf: top namespace info seems to be lost in
                    GDB
           Product: gcc
           Version: 6.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jeanmichael.celerier at gmail dot com
  Target Milestone: ---

Given the following code: 

main.cpp: 

    namespace ossia
    {
        class foo { public: void f() { } };
        namespace net 
        { 
            class bar { public: void g() { } };
        }
    }

    int main()
    {
        auto x = new ossia::foo;
        auto y = new ossia::net::bar;
        x->f();
        y->g();
    }

And the following invocation : 

    g++ -ggdb -O0 -gsplit-dwarf -Wl,--gdb-index -fuse-ld=gold main.cpp

Debugging in gdb looks like this : 

    gdb a.out
    b main
    > auto x = new ossia::foo;
    p x
    > $1 = ((anonymous namespace)::foo *) 0x414c20
    n
    p y
    > $2 = ((anonymous namespace)::net::bar *) 0x414c40

Doing 

    strings a.out | c++filt

seems to yield the correct types, though.

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