47 lines · plain
1# Test to check if machine function splitter still produces the right backtraces2# with lldb when a function is split into a hot and cold part and the cold part3# is executed. The cold part has the same function symbol name but with a4# ".cold" suffix and this test checks that the back trace is clear.5 6# UNSUPPORTED: system-darwin, system-windows7# REQUIRES: target-x86_648# REQUIRES: lld9 10# RUN: split-file %s %t.split11#12# RUN: %clang_host %p/Inputs/split-machine-functions.ll -o %t13# RUN: %lldb %t -s %t.split/commands -o exit | FileCheck %s --check-prefix=DEFAULT14#15# RUN: %clang_host %p/Inputs/split-machine-functions.ll -fsplit-machine-functions -o %t16# RUN: %lldb %t -s %t.split/commands -o exit | FileCheck %s --check-prefix=SPLIT17#18# Test a permutation where foo.cold is very far from foo. The default ordering does not19# ensure that there will be a gap between foo and foo.cold. Using a symbol ordering20# file guarantees this21# 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-warnings22# RUN: %lldb %t -s %t.split/commands -o exit | FileCheck %s --check-prefix=SPLIT23 24#--- commands25breakpoint set -n bar26# DEFAULT: Breakpoint 1: where = {{.*}}`bar27# SPLIT: Breakpoint 1: where = {{.*}}`bar28 29process launch30# DEFAULT: stop reason = breakpoint 1.131# SPLIT: stop reason = breakpoint 1.132 33thread backtrace34# DEFAULT: frame #0: {{.*}}`bar35# DEFAULT: frame #1: {{.*}}`foo() +36# DEFAULT: frame #2: {{.*}}`main +37# SPLIT: frame #0: {{.*}}`bar38# SPLIT: frame #1: {{.*}}`foo() (.cold) +39# SPLIT: frame #2: {{.*}}`main +40 41#--- sym_order_1.txt42_Z3foov43main44_Z3barv45_Z3bazv46_Z3foov.cold47