[all-commits] [llvm/llvm-project] 4add85: [lldb] Improve platform handling in CreateTargetIn...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Wed Jul 29 10:30:42 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4add853647b358d9bb7f162682e806725888848b
      https://github.com/llvm/llvm-project/commit/4add853647b358d9bb7f162682e806725888848b
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2020-07-29 (Wed, 29 Jul 2020)

  Changed paths:
    M lldb/source/Commands/CommandObjectTarget.cpp
    M lldb/source/Target/TargetList.cpp
    M lldb/test/API/commands/target/basic/TestTargetCommand.py
    A lldb/test/API/commands/target/basic/bogus.yaml

  Log Message:
  -----------
  [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




More information about the All-commits mailing list