This is the mail archive of the
mailing list for the GDB project.
Re: [RFA] New python module gdb.types
On Wed, Oct 6, 2010 at 3:11 PM, Tom Tromey <firstname.lastname@example.org> wrote:
> I wouldn't mind if has_field were made a method on Type, but of course
> that can be done at any time.
It could, but there are design issues.
E.g., the has_field function calls get_basic_type and traverses base
types (instead of treating base types as a field which is what the
current gdb.Type API does. It's an internal implementation detail of
gdb that got exposed. Maybe it's reasonable to keep, I don't know).
Whether Type.has_field should do that ... I'm not sure.
It felt safer to see what works as a separate function before
> I think the documentation would be a little improved if the gdb.Type
> documentation had an xref to the new module's documentation.