llvm-capstone/lldb
Pavel Labath 324396466c DWARF: Don't compute address ranges for type units
Summary:
Type units don't describe any code, so they should never be the result
of any address lookup queries.

Previously, we would compute the address ranges for the type units for
via the line tables they reference because the type units looked a lot
like line-tables-only compile units. However, this is not correct, as
the line tables are only referenced from type units so that other
declarations can use the file names contained in them.

In this patch I make the BuildAddressRangeTable function virtual, and
implement it only for compile units.

Testing this was a bit tricky, because the behavior depends on the order
in which we add things to the address range map. This rarely caused a
problem with DWARF v4 type units, as they are always added after all
CUs. It happened more frequently with DWARF v5, as there clang emits the
type units first. However, this is still not something that it is
required to do, so for testing I've created an assembly file where I've
deliberately sandwiched a compile unit between two type units, which
should isolate us from both changes in how the compiler emits the units
and changes in the order we process them.

Reviewers: clayborg, aprantl, JDevlieghere

Subscribers: jdoerfert, lldb-commits

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

llvm-svn: 361465
2019-05-23 09:07:51 +00:00
..
cmake [CMake] Add first CMake cache files 2019-05-17 19:19:41 +00:00
docs Update list of supported architectures. 2019-05-17 17:05:23 +00:00
examples [crashlog] Use loads() instead of readPlistFromString() for python 3. 2019-05-18 01:57:12 +00:00
include/lldb [Reproducer] Pass FileSpec by const-ref. (NFC) 2019-05-23 05:45:49 +00:00
lit DWARF: Don't compute address ranges for type units 2019-05-23 09:07:51 +00:00
lldb.xcodeproj Ack, added DWARFTypeUnit to the wrong target... 2019-05-23 00:12:45 +00:00
lldb.xcworkspace Remove accidentally commited file in xcshareddata 2019-02-05 23:35:01 +00:00
packages/Python/lldbsuite [Test] Fix conflicting test names. 2019-05-21 20:55:00 +00:00
resources [CMake] Revised LLDB.framework builds 2019-01-04 12:46:50 +00:00
scripts Make SBDebugger.RunCommandInterpreter callable from Python. 2019-05-15 00:08:55 +00:00
source DWARF: Don't compute address ranges for type units 2019-05-23 09:07:51 +00:00
test [CMake] Fix subtle CMake bug 2019-04-29 19:44:43 +00:00
third_party/Python/module [lldb/thirdparty] Remove unneeded files, asked by Jonas. 2019-03-12 20:41:36 +00:00
tools [lldb] Fix use-of-uninitialized-value in Driver 2019-05-22 23:37:48 +00:00
unittests minidump: Remove checked-in files used for testing MemoryList handling 2019-05-20 08:22:59 +00:00
utils [lldb] [lit] Add tests for reading ZMM registers (AVX512) 2019-04-29 11:38:10 +00:00
.arcconfig
.clang-format
.gitignore Add .noindex to the gitignore 2019-04-05 17:57:42 +00:00
CMakeLists.txt Added a dot at the end of comment 2019-05-22 13:23:15 +00:00
CODE_OWNERS.txt Fix/unify the spelling of Objective-C. 2018-06-13 16:21:24 +00:00
INSTALL.txt Fix build URL in new LLDB website 2019-05-01 09:55:00 +00:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
use_lldb_suite_root.py