summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2017-05-02 12:40:31 +0000
committerPavel Labath <labath@google.com>2017-05-02 12:40:31 +0000
commitefddda3d8d8a8a1fa417d6a4e27f0bcf579061dc (patch)
tree44fae2049b5761d31067fef9ea1a35348865eeb3 /lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
parent7a28368fab228c579fea60bb91fb12de59d03fb5 (diff)
downloadbcm5719-llvm-efddda3d8d8a8a1fa417d6a4e27f0bcf579061dc.tar.gz
bcm5719-llvm-efddda3d8d8a8a1fa417d6a4e27f0bcf579061dc.zip
ObjectFileELF: Fix symbol lookup in bss section
Summary: If we have symbol information in a separate file, we need to be very careful about presenting a unified section view of module to the rest of the debugger. ObjectFileELF had code to handle that, but it was being overly cautious -- the section->GetFileSize()!=0 meant that the unification would fail for sections which do not occupy any space in the object file (e.g., .bss). In my case, that manifested itself as not being able to display the values of .bss variables properly as the section associated with the variable did not have it's load address set (because it was not present in the unified section list). I test this by making sure the unified section list and the variables refer to the same section. Reviewers: eugene, zturner Subscribers: tberghammer, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D32434 llvm-svn: 301917
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp')
-rw-r--r--lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 7126233bcf0..0720cca2734 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -2418,7 +2418,7 @@ unsigned ObjectFileELF::ParseSymbols(Symtab *symtab, user_id_t start_id,
.emplace(sect_name.GetCString(),
module_section_list->FindSectionByName(sect_name))
.first;
- if (section_it->second && section_it->second->GetFileSize())
+ if (section_it->second)
symbol_section_sp = section_it->second;
}
OpenPOWER on IntegriCloud