From eb4d6142dcd53d79d8f8a86908a035582965fc52 Mon Sep 17 00:00:00 2001 From: Tom Tan Date: Fri, 31 May 2019 23:43:31 +0000 Subject: [COFF, ARM64] Add CodeView register mapping CodeView has its own register map which is defined in cvconst.h. Missing this mapping before saving register to CodeView causes debugger to show incorrect value for all register based variables, like variables in register and local variables addressed by register (stack pointer + offset). This change added mapping between LLVM register and CodeView register so the correct register number will be stored to CodeView/PDB, it aso fixed the mapping from CodeView register number to register name based on current CPUType but print PDB to yaml still assumes X86 CPU and needs to be fixed. Differential Revision: https://reviews.llvm.org/D62608 llvm-svn: 362280 --- llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/ObjectYAML') diff --git a/llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp b/llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp index bbaa5ed75ad..227107c051d 100644 --- a/llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp +++ b/llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp @@ -147,7 +147,7 @@ void ScalarEnumerationTraits::enumeration(IO &io, CPUType &Cpu) { } void ScalarEnumerationTraits::enumeration(IO &io, RegisterId &Reg) { - auto RegNames = getRegisterNames(); + auto RegNames = getRegisterNames(CPUType::X64); for (const auto &E : RegNames) { io.enumCase(Reg, E.Name.str().c_str(), static_cast(E.Value)); } -- cgit v1.2.3