Python api to a type's member functions
Tom Tromey
tom@tromey.com
Fri Jul 19 20:16:00 GMT 2019
>>>>> "Sterling" == Sterling Augustine via gdb <gdb@sourceware.org> 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
More information about the Gdb
mailing list