llvm-project/lldb/lit/SymbolFile/DWARF
Nico Weber 8883ec7da2 Add support for deterministically linked binaries on macOS to lldb.
When ld64 links a binary deterministically using the flag ZERO_AR_DATE,
it sets a timestamp of 0 for N_OSO members in the symtab section, rather
than the usual last modified date of the object file. Prior to this
patch, lldb would compare the timestamp from the N_OSO member against
the last modified date of the object file, and skip loading the object
file if there was a mismatch. This patch updates the logic to ignore the
timestamp check if the N_OSO member has timestamp 0.

The original logic was added in https://reviews.llvm.org/rL181631 as a
safety check to avoid problems when debugging if the object file was out
of date. This was prior to the introduction of deterministic build in
ld64. lld still doesn't support deterministic build.

Other code in llvm already relies on and uses the assumption that a
timestamp of 0 means deterministic build. For example, commit
9ccfddc39d adds similar timestamp checking
logic to dsymutil, but special cases timestamp 0. Likewise, commit
0d1bb79a04 adds a long comment describing
deterministic archive, which mostly uses timestamp 0 for determinism.

Patch from Erik Chen <erikchen@chromium.org>!

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

llvm-svn: 368199
2019-08-07 19:29:04 +00:00
..
Inputs A more robust way of testing debug_line parser near the end of module 2019-08-07 11:33:56 +00:00
apple-index-is-used.cpp Fix some issues with LLDB's lit configuration files. 2018-11-19 15:12:34 +00:00
array-sizes.s Add "REQUIRES: x86" to DWARF assembly tests 2019-06-10 15:08:00 +00:00
childless-compile-unit.s Add "REQUIRES: x86" to DWARF assembly tests 2019-06-10 15:08:00 +00:00
debug-line-basic.s A more robust way of testing debug_line parser near the end of module 2019-08-07 11:33:56 +00:00
debug-names-compressed.cpp Fix some issues with LLDB's lit configuration files. 2018-11-19 15:12:34 +00:00
debug-types-address-ranges.s Add "REQUIRES: x86" to DWARF assembly tests 2019-06-10 15:08:00 +00:00
debug-types-basic.test DWARF: Add support for type units+split dwarf combo 2019-06-25 06:59:48 +00:00
debug-types-dwarf5.s DWARF: Don't create lldb CompileUnits for DWARF type units 2019-06-13 11:22:47 +00:00
debug-types-dwo-cross-reference.cpp [DWARF] Add one more type unit test 2019-07-02 07:57:08 +00:00
debug-types-expressions.test DWARF: Add support for type units+split dwarf combo 2019-06-25 06:59:48 +00:00
debug-types-line-tables.s DWARF: Don't create lldb CompileUnits for DWARF type units 2019-06-13 11:22:47 +00:00
debug-types-missing-signature.test DWARF: Implement DW_AT_signature lookup for type unit support 2019-05-24 08:11:12 +00:00
debug-types-signature-loop.s Add "REQUIRES: x86" to DWARF assembly tests 2019-06-10 15:08:00 +00:00
debug_aranges-empty-section.s Add "REQUIRES: x86" to DWARF assembly tests 2019-06-10 15:08:00 +00:00
debug_loc.s Add "REQUIRES: x86" to DWARF assembly tests 2019-06-10 15:08:00 +00:00
debug_ranges-missing-section.s Add "REQUIRES: x86" to DWARF assembly tests 2019-06-10 15:08:00 +00:00
debug_ranges.s Add "REQUIRES: x86" to DWARF assembly tests 2019-06-10 15:08:00 +00:00
debug_ranges_and_rnglists.test DWARF: Fix address range support in mixed 4+5 scenario 2019-05-29 09:22:36 +00:00
debug_rnglists.s Add "REQUIRES: x86" to DWARF assembly tests 2019-06-10 15:08:00 +00:00
deterministic-build.cpp Add support for deterministically linked binaries on macOS to lldb. 2019-08-07 19:29:04 +00:00
dir-separator-no-comp-dir-relative-name.s Fix line table resolution near the end of a section 2019-08-06 06:52:05 +00:00
dir-separator-no-comp-dir.s Fix line table resolution near the end of a section 2019-08-06 06:52:05 +00:00
dir-separator-posix.s Fix line table resolution near the end of a section 2019-08-06 06:52:05 +00:00
dir-separator-windows.s Fix line table resolution near the end of a section 2019-08-06 06:52:05 +00:00
dwarf5-index-is-used.cpp Fix some issues with LLDB's lit configuration files. 2018-11-19 15:12:34 +00:00
dwarf5-partial-index.cpp Fix some issues with LLDB's lit configuration files. 2018-11-19 15:12:34 +00:00
dwarf5_locations.s Add "REQUIRES: x86" to DWARF assembly tests 2019-06-10 15:08:00 +00:00
find-basic-function.cpp Fix some issues with LLDB's lit configuration files. 2018-11-19 15:12:34 +00:00
find-basic-namespace.cpp Fix some issues with LLDB's lit configuration files. 2018-11-19 15:12:34 +00:00
find-basic-type.cpp Fix some issues with LLDB's lit configuration files. 2018-11-19 15:12:34 +00:00
find-basic-variable.cpp Fix some issues with LLDB's lit configuration files. 2018-11-19 15:12:34 +00:00
find-function-regex.cpp Fix some issues with LLDB's lit configuration files. 2018-11-19 15:12:34 +00:00
find-inline-method.s Add "REQUIRES: x86" to DWARF assembly tests 2019-06-10 15:08:00 +00:00
find-method-local-struct.cpp Fix some issues with LLDB's lit configuration files. 2018-11-19 15:12:34 +00:00
find-method.cpp Fix some issues with LLDB's lit configuration files. 2018-11-19 15:12:34 +00:00
find-qualified-variable.cpp Fix some issues with LLDB's lit configuration files. 2018-11-19 15:12:34 +00:00
find-type-in-function.cpp Fix some issues with LLDB's lit configuration files. 2018-11-19 15:12:34 +00:00
find-variable-dwo.cpp Fix some issues with LLDB's lit configuration files. 2018-11-19 15:12:34 +00:00
find-variable-file.cpp DWARF: Add "dwo_num" field to the DIERef class 2019-06-21 07:56:50 +00:00
forward-declarations.s DWARF: Share line tables of type units 2019-06-12 11:29:50 +00:00
gnu-style-compression.cpp ObjectFileELF: Add support for gnu-style compressed sections 2019-07-10 16:10:43 +00:00
lit.local.cfg DWARF: Introduce DWARFTypeUnit class 2019-05-22 09:09:39 +00:00
parallel-indexing-stress.s Add "REQUIRES: x86" to DWARF assembly tests 2019-06-10 15:08:00 +00:00
split-dwarf-inlining.cpp Ignore DIEs in the skeleton unit in a DWO scenario 2019-06-05 07:29:55 +00:00
split-dwarf-multiple-cu.ll DWARF: Add support for type units+split dwarf combo 2019-06-25 06:59:48 +00:00