summaryrefslogtreecommitdiffstats
path: root/lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp')
-rw-r--r--lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp b/lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp
new file mode 100644
index 00000000000..576c4ab7244
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp
@@ -0,0 +1,11 @@
+// Test that binaries linked deterministically (N_OSO has timestamp 0) can still
+// have their object files loaded by lldb. Note that the env var ZERO_AR_DATE
+// requires the ld64 linker, which clang invokes by default.
+// REQUIRES: system-darwin
+// RUN: %clang %s -g -c -o %t.o
+// RUN: ZERO_AR_DATE=1 %clang %t.o -g -o %t
+// RUN: %lldb %t -o "breakpoint set -f %s -l 11" -o run -o exit | FileCheck %s
+// CHECK: stop reason = breakpoint
+
+
+int main() { return 0; }
OpenPOWER on IntegriCloud