llvm-project/lldb/source/Core
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
..
Address.cpp Remove SymbolVendor::GetSymtab 2019-08-05 09:21:47 +00:00
AddressRange.cpp Include inlined functions when figuring out a contiguous address range 2019-05-06 20:01:21 +00:00
AddressResolver.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
AddressResolverFileLine.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
AddressResolverName.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt [lldb] Qualify includes of Properties[Enum].inc files. NFC 2019-07-29 17:22:10 +00:00
Communication.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
CoreProperties.td [lldb] Qualify includes of Properties[Enum].inc files. NFC 2019-07-29 17:22:10 +00:00
Debugger.cpp Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC 2019-08-05 05:43:48 +00:00
Disassembler.cpp Revert "Disable the step over skipping calls feature since buildbots are not happy." 2019-05-10 06:57:25 +00:00
DumpDataExtractor.cpp Replace 'ap' with 'up' suffix in variable names. (NFC) 2019-02-13 06:25:41 +00:00
DumpRegisterValue.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DynamicLoader.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
EmulateInstruction.cpp Fix a "memset clearing an object of non-trivial type" warning in EmulateInstruction 2019-03-19 15:05:55 +00:00
FileLineResolver.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
FileSpecList.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
FormatEntity.cpp [CompletionRequest] Remove unimplemented members. 2019-07-31 03:48:29 +00:00
Highlighter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
IOHandler.cpp [Gardening] Remove dead code from IOHandler (NFC) 2019-08-06 04:45:55 +00:00
Mangled.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
Module.cpp Remove SymbolVendor::GetSymtab 2019-08-05 09:21:47 +00:00
ModuleChild.cpp Delete unnecessary copy ctors/copy assignment operators 2019-05-15 11:23:54 +00:00
ModuleList.cpp [lldb] Qualify includes of Properties[Enum].inc files. NFC 2019-07-29 17:22:10 +00:00
Opcode.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PluginManager.cpp [Target] Decouple ObjCLanguageRuntime from LanguageRuntime 2019-06-21 19:43:07 +00:00
RichManglingContext.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
SearchFilter.cpp SymbolVendor: Remove passthrough methods 2019-08-06 09:12:42 +00:00
Section.cpp ObjectFileELF: permit thread-local sections with overlapping file addresses 2019-08-06 10:04:27 +00:00
SourceManager.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
StreamAsynchronousIO.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StreamFile.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
UserSettingsController.cpp Pass ConstString by value (NFC) 2019-03-06 21:22:25 +00:00
Value.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
ValueObject.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
ValueObjectCast.cpp Pass ConstString by value (NFC) 2019-03-06 21:22:25 +00:00
ValueObjectChild.cpp Pass ConstString by value (NFC) 2019-03-06 21:22:25 +00:00
ValueObjectConstResult.cpp Pass ConstString by value (NFC) 2019-03-06 21:22:25 +00:00
ValueObjectConstResultCast.cpp Pass ConstString by value (NFC) 2019-03-06 21:22:25 +00:00
ValueObjectConstResultChild.cpp Pass ConstString by value (NFC) 2019-03-06 21:22:25 +00:00
ValueObjectConstResultImpl.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
ValueObjectDynamicValue.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
ValueObjectList.cpp Delete unnecessary copy ctors/copy assignment operators 2019-05-15 11:23:54 +00:00
ValueObjectMemory.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00
ValueObjectRegister.cpp [Symbol] Use llvm::Expected when getting TypeSystems 2019-07-30 22:12:34 +00:00
ValueObjectSyntheticFilter.cpp [Logging] Replace Log::Printf with LLDB_LOG macro (NFC) 2019-07-24 17:56:10 +00:00
ValueObjectVariable.cpp [lldb] NFC modernize codebase with modernize-use-nullptr 2019-05-23 11:14:47 +00:00