Skip to content

Commit 6b39d19

Browse files
committed
[LLDB][ELF] Also ignore section type when matching.
The section type can change when using `objcopy --only-keep-debug`, apparently. rdar://124467787
1 parent 25eeeac commit 6b39d19

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1852,13 +1852,12 @@ static SectionSP FindMatchingSection(const SectionList &section_list,
18521852
addr_t vm_addr = section->GetFileAddress();
18531853
ConstString name = section->GetName();
18541854
offset_t byte_size = section->GetByteSize();
1855-
SectionType type = section->GetType();
18561855
bool thread_specific = section->IsThreadSpecific();
18571856
uint32_t permissions = section->GetPermissions();
18581857
uint32_t alignment = section->GetLog2Align();
18591858

18601859
for (auto sect : section_list) {
1861-
if (sect->GetName() == name && sect->GetType() == type &&
1860+
if (sect->GetName() == name &&
18621861
sect->IsThreadSpecific() == thread_specific &&
18631862
sect->GetPermissions() == permissions &&
18641863
sect->GetByteSize() == byte_size && sect->GetFileAddress() == vm_addr &&

0 commit comments

Comments
 (0)