In one of the 2 places the LC_BUILD_VERSION load command is handled, there
is a bug preventing us from actually handling them (the address where to
read the load command was not updated). This patch factors reading the
deployment target load commands into a helper and adds testing for the 2
code paths calling the helper.
The testing is a llittle bit complicated because the only times those load
commands matter is when debugging a simulator process. I added a new
decorator to check that a specific SDK is available. The actual testing was
fairly easy once I knew how to run a simulated process.
Adding Pavel as a reviewer given I slightly modified the lldb-server test
harness.
It might be helpful for anyone debugging this if examples of the names this is matching were included in a comment. iphonesimulator, appletvsimulator, watchsimulator. Different capitalization is used in so many places (and whether to include "os" suffix or not, and whether to include "apple" prefix or not) that it can be hard to know what's expected unless you run the command yourself.