Python api to a type's member functions

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Python api to a type's member functions

Sourceware - gdb list mailing list
Is there python API to get a C++ class's member functions?

Iterating over a gdb.Type's fields doesn't list them, and there doesn't
seem to be a way within a gdb.Value either.

ptype prints them so they are obviously available in the debug information.

Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: Python api to a type's member functions

Tom Tromey-2
>>>>> "Sterling" == Sterling Augustine via gdb <[hidden email]> writes:

Sterling> Is there python API to get a C++ class's member functions?

Nope.

Sterling> Iterating over a gdb.Type's fields doesn't list them, and there doesn't
Sterling> seem to be a way within a gdb.Value either.

Sterling> ptype prints them so they are obviously available in the debug information.

The information is in struct type in gdb; it just isn't exposed to
Python.  Exposing it may not be hard to do.

A related issue is that there's no good way to invoke a method.
See https://sourceware.org/bugzilla/show_bug.cgi?id=13326

Tom