[Lldb-commits] [lldb] [lldb] Support arm64e in the expression evaluator (PR #186001)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 16 13:04:41 PDT 2026
================
@@ -767,6 +768,16 @@ ClangExpressionParser::ClangExpressionParser(
// appropriate for most situations.
SetupTargetOpts(*m_compiler, *target_sp);
+ const llvm::Triple triple = target_sp->GetArchitecture().GetTriple();
+ const bool enable_ptrauth =
+ triple.isArm64e() && !force_disable_ptrauth_codegen;
+
+ if (enable_ptrauth) {
----------------
JDevlieghere wrote:
> Could you please clarify why we need this piece of logic be duplicated
I don't think it's necessary, I suspect it was a misunderstanding when this was implemented originally.
>Also, is there a specific reason why we only set these two LangOpts and not remaining PointerAuth options included in arm64e?
I can't answer definitively, but I suspect it's because we want the minimal subset of pointer auth options that allows us to execute an expression in the inferior. It's fine if the expression isn't as "secure" as the context it runs in as long as it's compatible.
That said, it's totally possible this list is incomplete and we just haven't noticed because we don't have dedicated test for certain PtrAuth features and/or our test suite doesn't exercise them. I'm happy to keep iterating on this in the future as we uncover such things, but for now I'm aiming for parity with our downstream implementation.
https://github.com/llvm/llvm-project/pull/186001
More information about the lldb-commits
mailing list