[Lldb-commits] [lldb] [lldb] Interpret the ptrauth intrinsics in IRInterpreter (PR #232467)

Yao Qi via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 16 02:36:43 PDT 2026


================
@@ -1453,6 +1456,55 @@ bool IRInterpreter::Interpret(llvm::Module &module, llvm::Function &function,
     case Instruction::Call: {
       const CallInst *call_inst = cast<CallInst>(inst);
 
+      if (auto *fn = call_inst->getCalledFunction()) {
+        if (fn->isIntrinsic() &&
+            ((fn->getIntrinsicID() == llvm::Intrinsic::ptrauth_auth &&
+              call_inst->arg_size() == 3) ||
+             (fn->getIntrinsicID() == llvm::Intrinsic::ptrauth_strip &&
+              call_inst->arg_size() == 2)) &&
+            exe_ctx.GetProcessPtr()) {
+          llvm::Value *auth_ptr = call_inst->getArgOperand(0);
+          // Extract the argument's value.
+          lldb_private::Scalar auth_ptr_val;
+          if (!frame.EvaluateValue(auth_ptr_val, auth_ptr, module)) {
+            error = lldb_private::Status::FromErrorStringWithFormat(
----------------
qiyao wrote:

Good catch.  Fixed.

https://github.com/llvm/llvm-project/pull/232467


More information about the lldb-commits mailing list