1 # Test to check if machine function splitter still produces the right backtraces
2 # with lldb when a function is split into a hot and cold part and the cold part
3 # is executed. The cold part has the same function symbol name but with a
4 # ".cold" suffix and this test checks that the back trace is clear.
6 # UNSUPPORTED: system-darwin, system-windows
7 # REQUIRES: target-x86_64
10 # RUN: split-file %s %t.split
12 # RUN: %clang_host %p/Inputs/split-machine-functions.ll -o %t
13 # RUN: %lldb %t -s %t.split/commands -o exit | FileCheck %s --check-prefix=DEFAULT
15 # RUN: %clang_host %p/Inputs/split-machine-functions.ll -fsplit-machine-functions -o %t
16 # RUN: %lldb %t -s %t.split/commands -o exit | FileCheck %s --check-prefix=SPLIT
18 # Test a permutation where foo.cold is very far from foo. The default ordering does not
19 # ensure that there will be a gap between foo and foo.cold. Using a symbol ordering
20 # file guarantees this
21 # RUN: %clang_host %p/Inputs/split-machine-functions.ll -fsplit-machine-functions -o %t -fuse-ld=lld -Wl,--symbol-ordering-file,%t.split/sym_order_1.txt -Wl,--warn-symbol-ordering -Wl,--fatal-warnings
22 # RUN: %lldb %t -s %t.split/commands -o exit | FileCheck %s --check-prefix=SPLIT
26 # DEFAULT: Breakpoint 1: where = {{.*}}`bar
27 # SPLIT: Breakpoint 1: where = {{.*}}`bar
30 # DEFAULT: stop reason = breakpoint 1.1
31 # SPLIT: stop reason = breakpoint 1.1
34 # DEFAULT: frame #0: {{.*}}`bar
35 # DEFAULT: frame #1: {{.*}}`foo() +
36 # DEFAULT: frame #2: {{.*}}`main +
37 # SPLIT: frame #0: {{.*}}`bar
38 # SPLIT: frame #1: {{.*}}`foo() (.cold) +
39 # SPLIT: frame #2: {{.*}}`main +