Summary: This patch addresses an ambiguity in how our existing tests invoke the compiler. Roughly two thirds of our current "shell" tests invoke the compiler to build the executables for the host. However, there is also a significant number of tests which don't build a host binary (because they don't need to run it) and instead they hardcode a certain target. We also have code which adds a bunch of default arguments to the %clang substitutions. However, most of these arguments only really make sense for the host compilation. So far, this has worked mostly ok, because the arguments we were adding were not conflicting with the target-hardcoding tests (though they did provoke an occasional "argument unused" warning). However, this started to break down when we wanted to use target-hardcoding clang-cl tests (D69031) because clang-cl has a substantially different command line, and it was getting very confused by some of the arguments we were adding on non-windows hosts. This patch avoid this problem by creating separate %clang(xx,_cl)_host substutitions, which are specifically meant to be used for compiling host binaries. All funny host-specific options are moved there. To ensure that the regular %clang substitutions are not used for compiling host binaries (skipping the extra arguments) I employ a little hac^H^H^Htrick -- I add an invalid --target argument to the %clang substitution, which means that one has to use an explicit --target in order for the compilation to succeed. Reviewers: JDevlieghere, aprantl, mstorsjo, espindola Subscribers: emaste, arichardson, MaskRay, jfb, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69619
101 lines
2.2 KiB
Plaintext
101 lines
2.2 KiB
Plaintext
# UNSUPPORTED: system-windows, system-freebsd
|
|
|
|
# This tests that stepping continues to work when replaying a reproducer.
|
|
|
|
# RUN: rm -rf %t.repro
|
|
# RUN: %clang_host %S/Inputs/stepping.c -O0 -g -o %t.out
|
|
# RUN: grep -v '#' %s > %t.in
|
|
|
|
# RUN: %lldb -x -b -s %t.in --capture --capture-path %t.repro %t.out | FileCheck %s --check-prefix CHECK
|
|
# RUN: %lldb --replay %t.repro | FileCheck %s --check-prefix CHECK
|
|
|
|
# Set breakpoints in a,b and c and verify we stop there when stepping.
|
|
|
|
breakpoint set -f stepping.c -l 28
|
|
# CHECK: Breakpoint 1: {{.*}} stepping.c:28
|
|
|
|
breakpoint set -f stepping.c -l 10
|
|
# CHECK: Breakpoint 2: {{.*}} stepping.c:10
|
|
|
|
breakpoint set -f stepping.c -l 19
|
|
# CHECK: Breakpoint 3: {{.*}} stepping.c:19
|
|
|
|
breakpoint set -f stepping.c -l 23
|
|
# CHECK: Breakpoint 4: {{.*}} stepping.c:23
|
|
|
|
run
|
|
# CHECK: Process {{.*}} stopped
|
|
# CHECK: stop reason = breakpoint 1.1
|
|
|
|
next
|
|
# CHECK: Process {{.*}} stopped
|
|
# CHECK: stop reason = breakpoint 2.1
|
|
|
|
next
|
|
# CHECK: Process {{.*}} stopped
|
|
# CHECK: stop reason = breakpoint 3.1
|
|
|
|
next
|
|
# CHECK: Process {{.*}} stopped
|
|
# CHECK: stop reason = breakpoint 4.1
|
|
|
|
bt
|
|
# CHECK: frame #0: {{.*}}`c
|
|
# CHECK: frame #1: {{.*}}`b
|
|
# CHECK: frame #2: {{.*}}`a
|
|
|
|
# Continue and stop resulting from the step overs.
|
|
|
|
cont
|
|
# CHECK: Process {{.*}} resuming
|
|
# CHECK: Process {{.*}} stopped
|
|
# CHECK: stop reason = step over
|
|
cont
|
|
# CHECK: Process {{.*}} resuming
|
|
# CHECK: Process {{.*}} stopped
|
|
# CHECK: stop reason = step over
|
|
cont
|
|
# CHECK: Process {{.*}} resuming
|
|
# CHECK: Process {{.*}} stopped
|
|
# CHECK: stop reason = step over
|
|
|
|
breakpoint disable 1
|
|
# CHECK: 1 breakpoints disabled.
|
|
|
|
breakpoint disable 2
|
|
# CHECK: 1 breakpoints disabled.
|
|
|
|
breakpoint disable 3
|
|
# CHECK: 1 breakpoints disabled.
|
|
|
|
breakpoint disable 4
|
|
# CHECK: 1 breakpoints disabled.
|
|
|
|
# Continue to line 48.
|
|
|
|
next
|
|
# CHECK: stop reason = step over
|
|
next
|
|
# CHECK: stop reason = step over
|
|
|
|
# Step into c.
|
|
thread step-in
|
|
# CHECK: stop reason = step in
|
|
thread step-in
|
|
# CHECK: stop reason = step in
|
|
thread step-in
|
|
# CHECK: stop reason = step in
|
|
thread step-in
|
|
# CHECK: stop reason = step in
|
|
thread step-in
|
|
# CHECK: stop reason = step in
|
|
|
|
# Finally continue until the end.
|
|
|
|
cont
|
|
# CHECK: Process {{.*}} resuming
|
|
# CHECK: Process {{.*}} exited with status = 0
|
|
|
|
# Generate the reproducer.
|
|
reproducer generate
|