[lldb-dev] What is the difference between an Arch and a Triple

Jim Ingham via lldb-dev lldb-dev at lists.llvm.org
Thu Jan 21 12:45:41 PST 2021

The fix is in:


but without any doc verbiage.


> On Jan 21, 2021, at 12:04 PM, Jim Ingham via lldb-dev <lldb-dev at lists.llvm.org> wrote:
> We have two API's:
> SBDebugger.CreateTargetWithFileAndTargetTriple
> SBDebugger.CreateTargetWithFileAndArch
> Both take a path and a string.  Currently, their implementations are almost identical, the major difference being that the first one ignores the error from target creation, but I don't think that part is on purpose.
> I can't find anywhere where we say what the difference between a "TargetTriple" and an "Arch" is.  I think the difference is that for an Arch you are allowed to pass lldb.LLDB_ARCH_DEFAULT as well as a target triple.  At least the example at the top of SBDebugger.i indicates this should work.  Unsurprisingly, since the two implementations are functionally the same, the call we suggest in SBDebugger.i using LLDB_ARCH_DEFAULT doesn't in fact work.  
> There's also a FindTargetByFileAndArch that also takes lldb.LLDB_ARCH_DEFAULT, but it actually does the work to translate the string using the current Platform, and that does work.
> The SBDebugger API is easy to fix, but I wanted to also put in something saying what the difference was except I'm not sure what to say.
> Jim
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

More information about the lldb-dev mailing list