[RFC v4 04/22] gdb/python: add owner property to gdb.Type

Tom Tromey tom@tromey.com
Fri Feb 21 18:33:04 GMT 2025


>>>>> "Jan" == Jan Vrany <jan.vrany@labware.com> writes:

Jan> This commit adds new property "owner" to gdb.Type objects, allowing
Jan> Python code to check if a particular type is "owned" by architecture or
Jan> by objfile. This will be useful later when we introduce Python API to
Jan> construct a new type out of existing ones.

I'm reading the patches in order so I didn't see whether this is used.

Anyway I wonder if we want to expose this detail.  Sometimes I think
it'd be better if types were decoupled from objfiles and instead we had
a global type stash and "type GC" to avoid the current "leaks".

OTOH that's just a dream and we haven't moved on it in 20 years or
whatever.

Tom


More information about the Gdb-patches mailing list