Skip to content

Commit a6c40f5

Browse files
committed
Revert "Fix lookup of symbols at the same address with no size vs. size"
This reverts commit 3f594ed. This change has cause LLDB expression evaluation to fail on Arm Linux. Differential Revision: https://reviews.llvm.org/D63540
1 parent 6aa60b0 commit a6c40f5

File tree

3 files changed

+2
-30
lines changed

3 files changed

+2
-30
lines changed

lldb/source/Symbol/Symtab.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -895,14 +895,8 @@ void Symtab::InitAddressIndexes() {
895895
for (size_t i = 0; i < num_entries; i++) {
896896
FileRangeToIndexMap::Entry *entry =
897897
m_file_addr_to_index.GetMutableEntryAtIndex(i);
898-
if (entry->GetByteSize() > 0)
899-
continue;
900-
addr_t curr_base_addr = entry->GetRangeBase();
901-
// Symbols with non-zero size will show after zero-sized symbols on the
902-
// same address. So do not set size of a non-last zero-sized symbol.
903-
if (i == num_entries - 1 ||
904-
m_file_addr_to_index.GetMutableEntryAtIndex(i + 1)
905-
->GetRangeBase() != curr_base_addr) {
898+
if (entry->GetByteSize() == 0) {
899+
addr_t curr_base_addr = entry->GetRangeBase();
906900
const RangeVector<addr_t, addr_t>::Entry *containing_section =
907901
section_ranges.FindEntryThatContains(curr_base_addr);
908902

lldb/test/Shell/SymbolFile/Inputs/sizeless-symbol.s

Lines changed: 0 additions & 8 deletions
This file was deleted.

lldb/test/Shell/SymbolFile/sizeless-symbol.test

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)