brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 8e563b7 Raw
50 lines · plain
1# Test to check if using basic block sections to reorder basic blocks at2# run-time still produces the right backtraces with lldb.3 4# UNSUPPORTED: system-darwin, system-windows5# REQUIRES: target-x86_646# REQUIRES: lld7 8# RUN: %clang_host %p/Inputs/basic-block-sections.c -o %t9# RUN: %lldb %t -s %s -o exit | FileCheck  %s --check-prefix=DEFAULT10 11# RUN: %clang_host %p/Inputs/basic-block-sections.c -o %t -fbasic-block-sections=all12# RUN: %lldb %t -s %s -o exit | FileCheck  %s --check-prefix=BBSECTIONS13 14# Reorder basic blocks so that main's basic blocks are discontiguous15# RUN: echo "main.__part.3" > %t.order16# RUN: echo "bar" >> %t.order17# RUN: echo "main" >> %t.order18# RUN: echo "main.__part.2" >> %t.order19# RUN: echo "foo" >> %t.order20# RUN: echo "main.__part.1" >> %t.order21# RUN: %clang_host %p/Inputs/basic-block-sections.c -o %t -fbasic-block-sections=all -fuse-ld=lld -Wl,--symbol-ordering-file,%t.order -Wl,--warn-symbol-ordering -Wl,--fatal-warnings22# RUN: %lldb %t -s %s -o exit | FileCheck  %s --check-prefix=BBSECTIONS23 24# Test the reverse permutation too.25# RUN: echo "main.__part.1" > %t.order26# RUN: echo "foo" >> %t.order27# RUN: echo "main.__part.2" >> %t.order28# RUN: echo "main" >> %t.order29# RUN: echo "bar" >> %t.order30# RUN: echo "main.__part.3" >> %t.order31# RUN: %clang_host %p/Inputs/basic-block-sections.c -o %t -fbasic-block-sections=all -fuse-ld=lld -Wl,--symbol-ordering-file,%t.order -Wl,--warn-symbol-ordering -Wl,--fatal-warnings32# RUN: %lldb %t -s %s -o exit | FileCheck  %s --check-prefix=BBSECTIONS33 34breakpoint set -n bar35# DEFAULT: Breakpoint 1: where = {{.*}}`bar36# BBSECTIONS: Breakpoint 1: where = {{.*}}`bar37 38process launch39# DEFAULT: stop reason = breakpoint 1.140# BBSECTIONS: stop reason = breakpoint 1.141 42thread backtrace43# DEFAULT: frame #0: {{.*}}`bar44# DEFAULT: frame #1: {{.*}}`foo45# DEFAULT: frame #2: {{.*}}`main +46 47# BBSECTIONS: frame #0: {{.*}}`bar48# BBSECTIONS: frame #1: {{.*}}`foo49# BBSECTIONS: frame #2: {{.*}}`main.__part.1 +50