Index: lldb/source/Plugins/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpression.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpression.cpp +++ lldb/source/Plugins/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpression.cpp @@ -24,9 +24,18 @@ using namespace lldb_private::postfix; static uint32_t ResolveLLDBRegisterNum(llvm::StringRef reg_name, llvm::Triple::ArchType arch_type) { + llvm::codeview::CPUType cpu; + switch(arch_type) { + case llvm::Triple::ArchType::aarch64: + case llvm::Triple::ArchType::aarch64_be: + case llvm::Triple::ArchType::aarch64_32: + cpu = llvm::codeview::CPUType::ARM64; + default: + cpu = llvm::codeview::CPUType::X64; + } // lookup register name to get lldb register number llvm::ArrayRef> register_names = - llvm::codeview::getRegisterNames(); + llvm::codeview::getRegisterNames(cpu); auto it = llvm::find_if( register_names, [®_name](const llvm::EnumEntry ®ister_entry) {