llvm-capstone/lldb/lit
Pavel Labath ad17e289f0 DWARF: Don't create lldb CompileUnits for DWARF type units
Summary:
Type units don't represent actual compilations and a lot of the
operations that we do with lldb compile units (getting their line
tables, variables, etc.) don't make sense for them. There is also a lot
more of them (sometimes over 100x), so making them more lightweight pays
off.

The main change in this patch is that we stop creating lldb CompileUnits
for DWARF type units. The trickiest part here is that the SymbolFile
interface requires that we assign consecutive sequence IDs to the
compile units we create. As DWARF type and compile units can come in any
order (in v5), this means we can no longer use 1-1 mapping between DWARF
and lldb compile units. Instead I build a translation table between the
two indices. To avoid pessimizing the case where there are no type
units, I build the translation table only in case we have at least one
type unit.

Additionaly, I also tried to strenghted type safete by replacing
DWARFUnit with DWARFCompileUnit where applicable. Though that was not
stricly necessary, I found it a good way to ensure that the
transformations I am doing here make sense. In the places where I was
changing the function signatures, and where it was obvious that the
objects being handled were not null, I also replaced pointers with
references.

There shouldn't be any major functional change with this patch. The only
change I observed is that now the types in the type units will not be
parsed when one calls Module::ParseAllDebugSymbols, unless they are
referenced from other compile units. This makes sense, given how
ParseAllDebugSymbols is implemented (it iterates over all compile
units), and it only matters for one hand-writted test where I did not
bother to reference the types from the compile units (which I now do).

Reviewers: clayborg, JDevlieghere, aprantl

Subscribers: jdoerfert, lldb-commits

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

llvm-svn: 363250
2019-06-13 11:22:47 +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 Fix a crash in option parsing. 2019-06-11 21:14:02 +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
helper [lldb] build.py: fix behavior when passing --compiler=/path/to/compiler 2019-05-09 16:47:07 +00:00
Minidump yamlify lit/Minidump tests 2019-04-24 08:09:36 +00:00
Modules Recognise debug_types.dwo as a debug info section 2019-06-12 11:42:42 +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] Include lldb version in the reproducer root 2019-06-13 04:35:22 +00:00
Settings [FormatEntity] Ignore ASCII escape sequences when colors are disabled. 2019-05-31 16:27:44 +00:00
Suite [lldb] [test] Pass appropriate -L&-Wl,-rpath for libc++ on NetBSD 2019-03-06 14:03:18 +00:00
SymbolFile DWARF: Don't create lldb CompileUnits for DWARF type units 2019-06-13 11:22:47 +00:00
tools @skipIfLinux flaky lldb-mi tests 2019-05-13 08:48:03 +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 XFAIL prefer-debug-over-eh-frame.test on darwin 2019-05-27 13:43:01 +00:00
Watchpoint [test] Convert TestWatchpointSetErrorCases.py to lit 2019-05-02 01:54:05 +00:00
CMakeLists.txt [CMake] Add special case for processing LLDB_DOTEST_ARGS 2019-06-07 14:32:51 +00:00
lit-lldb-init Add EchoCommentCommands to CommandInterpreterRunOptions in addition to the existing EchoCommands and expose both as interpreter settings. 2018-10-05 16:49:47 +00:00
lit.cfg.py [lldb] [lit] Driver/TestConvenienceVariables.test requires Python 2019-05-19 06:05:31 +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