[Lldb-commits] [PATCH] D65826: Add support for deterministically linked binaries on macOS to lldb.

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 6 17:42:04 PDT 2019

JDevlieghere added inline comments.

Comment at: lldb/lit/SymbolFile/DWARF/deterministic-build.cpp:1
+// 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
You'll want a `REQUIRES: system-darwin` here.

Comment at: lldb/lit/SymbolFile/DWARF/deterministic-build.cpp:6
+// RUN: ZERO_AR_DATE=1 %clang %t.o -g -o %t
+// RUN: %lldb %t -s %S/Inputs/deterministic-build.lldbinit -o exit | FileCheck %s
+// CHECK: int main() { return 0; }
If you check for `stop reason = breakpoint` instead of the source line, you don't have to work around the comments getting printed. You wouldn't even need an  input file anymore either.  

// RUN: %lldb %t -o "breakpoint set -name main" -o "run"  -o "exit" | FileCheck %s
// CHECK: stop reason = breakpoint



More information about the lldb-commits mailing list