llvm-project/lldb/source/Plugins
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
..
ABI [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
Architecture [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
Disassembler [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
DynamicLoader Remove SymbolVendor::GetSymtab 2019-08-05 09:21:47 +00:00
ExpressionParser SymbolVendor: Remove passthrough methods 2019-08-06 09:12:42 +00:00
Instruction Support Linux signal return trampolines in frame initialization 2019-07-19 14:05:55 +00:00
InstrumentationRuntime [Process] Remove unused field from HistoryThread 2019-06-19 21:33:44 +00:00
JITLoader Format OptionEnumValueElement (NFC) 2019-08-02 00:18:44 +00:00
Language [Formatters] Temporarily disable libc++ std::function formatter due to performance issue 2019-08-02 18:16:04 +00:00
LanguageRuntime [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
MemoryHistory [Process] Remove unused field from HistoryThread 2019-06-19 21:33:44 +00:00
ObjectContainer [ObjectContainerBSDArchive] Simplify a few things (NFC) 2019-07-12 20:08:41 +00:00
ObjectFile ObjectFileELF: permit thread-local sections with overlapping file addresses 2019-08-06 10:04:27 +00:00
OperatingSystem [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
Platform Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC 2019-08-05 05:43:48 +00:00
Process Remove usage of usleep in generic code 2019-08-05 08:23:25 +00:00
ScriptInterpreter [Gardening] Remove dead code from ScriptInterpreterPython (NFC) 2019-08-06 04:45:59 +00:00
StructuredData [lldb] Qualify includes of Properties[Enum].inc files. NFC 2019-07-29 17:22:10 +00:00
SymbolFile SymbolVendor: Remove passthrough methods 2019-08-06 09:12:42 +00:00
SymbolVendor SymbolVendorELF: Perform build-id lookup even without a debug link 2019-08-06 08:18:39 +00:00
SystemRuntime [Symbol] Use llvm::Expected when getting TypeSystems 2019-07-30 22:12:34 +00:00
UnwindAssembly Support Linux signal return trampolines in frame initialization 2019-07-19 14:05:55 +00:00
CMakeLists.txt Move StopInfoOverride callback to the new architecture plugin 2017-10-25 21:05:31 +00:00