(enum_type)
return enum_dict
Return a dictionary from a program's enum type.

    Arguments:
        enum_type: The enum to compute the dictionary for.

    Returns:
        The dictionary of the enum.

    Raises:
        TypeError: The type is not an enum.
Return a dictionary from a program's enum type.
Return a dictionary from a program s enum type .
def make_enum_dict(enum_type):
    """Return a dictionary from a program's enum type.

    Arguments:
        enum_type: The enum to compute the dictionary for.

    Returns:
        The dictionary of the enum.

    Raises:
        TypeError: The type is not an enum.
    """

    if enum_type.code != gdb.TYPE_CODE_ENUM:
        raise TypeError("not an enum type")
    enum_dict = {}
    for field in enum_type.fields():
        # The enum's value is stored in "enumval".
        enum_dict[field.name] = field.enumval
    return enum_dict
def make_enum_dict ( enum_type ) : if enum_type . code != gdb . TYPE_CODE_ENUM : raise TypeError ( "not an enum type" ) enum_dict = { } for field in enum_type . fields ( ) : # The enum's value is stored in "enumval". enum_dict [ field . name ] = field . enumval return enum_dict