[Lldb-commits] [PATCH] D32434: ObjectFileELF: Fix symbol lookup in bss section

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 24 07:48:50 PDT 2017


labath created this revision.
Herald added a subscriber: mgorny.

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.


https://reviews.llvm.org/D32434

Files:
  source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
  unittests/ObjectFile/ELF/CMakeLists.txt
  unittests/ObjectFile/ELF/Inputs/test.c
  unittests/ObjectFile/ELF/Inputs/test.dbg
  unittests/ObjectFile/ELF/Inputs/test.strip
  unittests/ObjectFile/ELF/TestObjectFileELF.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32434.96397.patch
Type: text/x-patch
Size: 4423 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170424/8db45c58/attachment.bin>


More information about the lldb-commits mailing list