[Lldb-commits] [PATCH] D62772: [COFF, ARM64] Fix CodeView API change for getRegisterNames
Tom Tan via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sun Jun 2 10:56:31 PDT 2019
TomTan updated this revision to Diff 202614.
TomTan added a comment.
Change to switch/case based on comment.
Repository:
rLLDB LLDB
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62772/new/
https://reviews.llvm.org/D62772
Files:
source/Plugins/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpression.cpp
Index: source/Plugins/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpression.cpp
===================================================================
--- source/Plugins/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpression.cpp
+++ source/Plugins/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpression.cpp
@@ -25,8 +25,19 @@
static uint32_t ResolveLLDBRegisterNum(llvm::StringRef reg_name, llvm::Triple::ArchType arch_type) {
// lookup register name to get lldb register number
+ llvm::codeview::CPUType cpu_type;
+ switch (arch_type) {
+ case llvm::Triple::ArchType::aarch64:
+ cpu_type = llvm::codeview::CPUType::ARM64;
+ break;
+
+ default:
+ cpu_type = llvm::codeview::CPUType::X64;
+ break;
+ }
+
llvm::ArrayRef<llvm::EnumEntry<uint16_t>> register_names =
- llvm::codeview::getRegisterNames();
+ llvm::codeview::getRegisterNames(cpu_type);
auto it = llvm::find_if(
register_names,
[®_name](const llvm::EnumEntry<uint16_t> ®ister_entry) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62772.202614.patch
Type: text/x-patch
Size: 1004 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190602/42b220ec/attachment.bin>
More information about the lldb-commits
mailing list