[Lldb-commits] [PATCH] D95164: Make SBDebugger::CreateTargetWithFileAndArch accept lldb.LLDB_DEFAULT_ARCH

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 21 14:56:44 PST 2021


jingham added a comment.

In D95164#2513644 <https://reviews.llvm.org/D95164#2513644>, @clayborg wrote:

> I think the only difference is the triple is supposed to be a complete triple and the arch can be just "arm64" and like you added, we let the currently selected platform help fill it out? I don't remember why this was added. Nothing in the source history?

The TargetTriple doesn't seem to need to be a full triple:

>>> target = lldb.debugger.CreateTargetWithFileAndTargetTriple("/tmp/foo", "x86_64")
>>> target.GetTriple()

'x86_64-apple-macosx11.0.0'

Looking at the FindTargetWithFileAndArch, it looks like the only difference is we call the Platform::GetAugmentedArchSpec in the Arch case, and that translates some symbolic constants (systemArch, systemArch32, systemArch64).

This code was from way before the dread reformatting and I don't feel like spelunking past that today...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95164/new/

https://reviews.llvm.org/D95164



More information about the lldb-commits mailing list