1 """ This module represents an abstraction of an lldb target / host platform. """
27 __darwin_embedded
= ["ios", "tvos", "watchos", "bridgeos"]
28 __darwin_simulators
= ["iphonesimulator", "watchsimulator", "appletvsimulator"]
35 ios
: ["ios", "iphonesimulator"],
36 tvos
: ["tvos", "appletvsimulator"],
37 watchos
: ["watchos", "watchsimulator"],
38 bridgeos
: ["bridgeos"],
39 darwin_all
: ["macosx", "darwin"] + __darwin_embedded
+ __darwin_simulators
,
40 darwin_embedded
: __darwin_embedded
+ __darwin_simulators
,
41 darwin_simulator
: __darwin_simulators
,
44 bsd_all
: ["freebsd", "netbsd"],
49 def translate(values
):
50 if isinstance(values
, int):
51 # This is a value from the platform enumeration, translate it.
52 return __name_lookup
[values
]
53 elif isinstance(values
, str):
54 # This is a raw string, return it.
56 elif hasattr(values
, "__iter__"):
57 # This is an iterable, convert each item.
58 result
= [translate(x
) for x
in values
]
59 result
= list(itertools
.chain(*result
))