This can be done by doing:
(lldb) platform select ios-simulator
(lldb) platform process list
There was code that was trying to detect simulator processes but it had an error in the loop where each time it would check for a env var that starts with "SIMULATOR_UDID=" it would change the architecture to iOS if it found it and MacOSX if it didn't. This meant unless "SIMULATOR_UDID=" was the last environment variable, this loop would never set the OS correctly. We also weren't setting the environment to Simulator which means PlatformAppleSimulator::FindProcesses(...) would never return any valid processes even when there were many.
I don't know how I can test this as we don't want a test suite having to launch an iOS simulator, so there are no tests at the moment. If anyone has any ideas on how to test this, please let me know.
clang-tidy: error: 'lldb/Host/Host.h' file not found [clang-diagnostic-error]
not useful