Skip to content

Commit 5ab44f3

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 (cherry picked from commit a6c40f5)
1 parent 7a140f4 commit 5ab44f3

File tree

3 files changed

+2
-30
lines changed

3 files changed

+2
-30
lines changed

lldb/lit/SymbolFile/Inputs/sizeless-symbol.s

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

lldb/lit/SymbolFile/sizeless-symbol.test

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

lldb/source/Symbol/Symtab.cpp

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

0 commit comments

Comments
 (0)