Rc@stdZddlZdZdZdZdZdefdYZd Zd Z d Z d Z dS( s%Utilities for working with gdb.Types.iNcCsbxU|jtjks'|jtjkrW|jtjkrH|j}q|j}qW|jS(sReturn the "basic" type of a type. Arguments: type_: The type to reduce to its basic type. Returns: type_ with const/volatile is stripped away, and typedefs/references converted to the underlying type. (tcodetgdbt TYPE_CODE_REFtTYPE_CODE_TYPEDEFttargettstrip_typedefst unqualified(ttype_((s"/usr/share/gdb/python/gdb/types.pytget_basic_types cCst|}|jtjkr?|jtjkr?tdnxI|jD];}|jrtt|j |rt SqL|j |krLt SqLWt S(syReturn True if a type has the specified field. Arguments: type_: The type to examine. It must be one of gdb.TYPE_CODE_STRUCT, gdb.TYPE_CODE_UNION. field: The name of the field to look up. Returns: True if the field is present either in type_ or any baseclass. Raises: TypeError: The type is not a struct or union. snot a struct or union( RRRtTYPE_CODE_STRUCTtTYPE_CODE_UNIONt TypeErrortfieldst is_base_classt has_fieldttypetTruetnametFalse(Rtfieldtf((s"/usr/share/gdb/python/gdb/types.pyR*s  cCsR|jtjkr!tdni}x$|jD]}|j||js