HomePhabricator

[lldb] Improve platform handling in CreateTargetInternal

Authored by JDevlieghere on Jul 29 2020, 8:59 AM.

Description

[lldb] Improve platform handling in CreateTargetInternal

Currently, target create has no --platform option. However,
TargetList::CreateTargetInternal which is called under the hood, will
return an error when either no platform or multiple matching platforms
are found, saying that a platform should be specified with --platform.

This patch adds the platform option, but that doesn't solve either of
these errors.

  • If more than one platform matches, specifying the platform isn't going to fix that. The current code will only look at the architecture instead. I've updated the error message to ask the user to specify an architecture.
  • If no architecture is found, specifying a new one via platform isn't going to change that either because we already try to find one that matches the given architecture.

Differential revision: https://reviews.llvm.org/D84809

Details