llvm-project/lldb/lit
Pavel Labath 1177bc597d ObjectFileELF: permit thread-local sections with overlapping file addresses
Summary:
In an attempt to make file-address-based lookups more predictable, in D55998
we started ignoring sections which would result in file address
overlaps. It turns out this was too aggressive because thread-local
sections typically will have file addresses which apear to overlap
regular data/code. This does not cause a problem at runtime because
thread-local sections are loaded into memory using special logic, but it
can cause problems for lldb when trying to lookup objects by their file
address.

This patch changes ObjectFileELF to permit thread-local sections to
overlap regular ones by essentially giving them a separate address
space. It also makes them more symmetrical to regular sections by
creating container sections from PT_TLS segments.

Simultaneously, the patch changes the regular file address lookup logic
to ignore sections with the thread-specific bit set. I believe this is
what the users looking up file addresses would typically expect, as
looking up thread-local data generally requires more complex logic (e.g.
DWARF has a special opcode for that).

Reviewers: clayborg, jingham, MaskRay

Subscribers: emaste, aprantl, arichardson, lldb-commits

Differential Revision: https://reviews.llvm.org/D65282

llvm-svn: 368010
2019-08-06 10:04:27 +00:00
..
Breakpoint Fix flakiness in lldb lit test 2019-05-13 09:48:26 +00:00
BuildScript [lldb] [lit] Pass --mode=compile to fix compiler-full-path.test 2019-05-15 10:48:55 +00:00
Commands [lldb] [lit] Skip more tests when Python is unavailable 2019-05-19 09:27:52 +00:00
Driver Reapply "Fix a crash in option parsing." 2019-06-25 00:55:27 +00:00
ExecControl/StopHook Fix file names in file headers. NFC 2019-05-13 04:42:32 +00:00
Expr [lit] Make sure tests are actually skipped on darwin and windows. 2019-01-17 21:57:33 +00:00
Heap Fix lldb's macosx/heap.py cstr command. 2018-12-17 18:21:51 +00:00
Minidump yamlify lit/Minidump tests 2019-04-24 08:09:36 +00:00
Modules ObjectFileELF: permit thread-local sections with overlapping file addresses 2019-08-06 10:04:27 +00:00
Process Disable TestEnvironment on Windows 2019-05-13 22:02:09 +00:00
Python Avoid using -S in combination with "script"; it's unreliable. 2019-03-07 00:46:56 +00:00
Quit [lldb] Update shebang python2 -> python 2019-01-26 01:05:02 +00:00
Register [lldb] [lit] Fix whitespace in matches for remaining AVX512 tests 2019-05-15 03:32:47 +00:00
Reproducer [Reproducers] Force replay in synchronous mode. 2019-07-31 23:34:45 +00:00
Settings [FormatEntity] Ignore ASCII escape sequences when colors are disabled. 2019-05-31 16:27:44 +00:00
Suite Fix `skipIfSanitized` decorator on macOS 2019-08-01 18:35:40 +00:00
SymbolFile Fix line table resolution near the end of a section 2019-08-06 06:52:05 +00:00
Unit [CMake] In standalone builds, LLVM_BINARY_DIR should point to LLVM's binary directory 2019-01-09 16:25:37 +00:00
Unwind Use rip-relative addressing in asm test 2019-08-02 19:06:15 +00:00
Watchpoint [test] Convert TestWatchpointSetErrorCases.py to lit 2019-05-02 01:54:05 +00:00
helper [lldb][NFC] Cleanup mentions and code related to lldb-mi 2019-07-19 15:55:23 +00:00
CMakeLists.txt Add llvm-dwarfdump to the list of test dependencies 2019-08-01 12:50:25 +00:00
lit-lldb-init.in [lldb] Increase testsuite packet-timeout 5secs -> 1min 2019-07-29 16:10:16 +00:00
lit.cfg.py [AIX][lit] Don't depend on psutil on AIX 2019-07-24 15:04:27 +00:00
lit.site.cfg.py.in Make lldb-mi optional and change how we deal with missing tools in lit 2019-05-03 20:33:58 +00:00