summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-07-13 00:12:22 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-07-13 00:12:22 +0000
commit6208607181c12a582f6b66b47869fa06f0ca2c5c (patch)
tree579b1f3f2576272604d0697196fe9602382fc6dd
parent4c980b99df7fd85980de029699f3e46de16aa5ec (diff)
[DWARFContext] Strip leading dot in section names
The LLVM context doesn't expect the leading dot in the section name. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@365978 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--source/Plugins/SymbolFile/DWARF/DWARFContext.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp b/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp
index 2f693fe5c..eb307ce1c 100644
--- a/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp
+++ b/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp
@@ -116,6 +116,8 @@ llvm::DWARFContext &DWARFContext::GetAsLLVM() {
llvm::StringRef data = llvm::toStringRef(section_data.GetData());
llvm::StringRef name = section.GetName().GetStringRef();
+ if (name.startswith("."))
+ name = name.drop_front();
section_map.try_emplace(
name, llvm::MemoryBuffer::getMemBuffer(data, name, false));
};