diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-07-13 00:12:22 +0000 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-07-13 00:12:22 +0000 |
| commit | b016de51e04fbade2b14d74e36b2cfc6edde9394 (patch) | |
| tree | 61a59beed12c1dc53063dd6f6ff5f0c06dd3d570 /lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp | |
| parent | de85380fa02506ebb7ebbd46b4eb3d80f5619e38 (diff) | |
| download | bcm5719-llvm-b016de51e04fbade2b14d74e36b2cfc6edde9394.tar.gz bcm5719-llvm-b016de51e04fbade2b14d74e36b2cfc6edde9394.zip | |
[DWARFContext] Strip leading dot in section names
The LLVM context doesn't expect the leading dot in the section name.
llvm-svn: 365978
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp')
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp index 2f693fe5c32..eb307ce1cce 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp +++ b/lldb/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)); }; |

