This is the mail archive of the gdb-prs@sourceware.org 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]
Other format: [Raw text]

[Bug python/10953] New: gdb.Type does not give access to Base classes


That's archer-tromey-python, at dad6b53fe4

The problem is that gdb.selected_frame().read_var("d").type.fields()  reports an
empty list. The list becomes non-empty as soon as the contents of derived.cpp is
moved to main.cpp.

------------------ Makefile ------------------
run:
        g++ -g base.cpp derived.cpp main.cpp -o yy
        ~/bin/gdb-archer -ex 'b main' -ex 'run' \
          -ex 'python print gdb.selected_frame().read_var("d").type.fields()' \
          ./yy


------------------ base.h ------------------
#ifndef BASE_H
struct Base
{
    virtual ~Base();
};
#endif


------------------ base.cpp ------------------
#include "base.h"

Base::~Base() {}


------------------ derived.h ------------------
#ifndef DERIVED_H

#include "base.h"

struct Derived : Base
{
    virtual ~Derived();
};
#endif


------------------ derived.cpp ------------------
#include "derived.h"

Derived::~Derived() {}


------------------ main.cpp ------------------

#include "derived.h"

int main()
{
    Derived d;
}
~

-- 
           Summary: gdb.Type does not give access to Base classes
           Product: gdb
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: python
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: andre dot poenitz at nokia dot com
                CC: gdb-prs at sourceware dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=10953

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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