# REQUIRES: x86 # REQUIRES: lld # RUN: %clang -target x86_64-pc-linux -g -O0 %S/Inputs/subprogram_ranges.s -o %t.o -c # RUN: ld.lld %t.o -o %t # RUN: %lldb -b -s %s %t 2>&1 | FileCheck %s # Test breaking on symbols and printing variables when a DW_TAG_subprogram uses # DW_AT_ranges instead of DW_AT_low_pc/DW_AT_high_pc. While the assembly here # is a bit unrealistic - it's a single-entry range using DWARFv4 which isn't # useful for anything (a single-entry range with DWARFv5 can reduce address # relocations, and multi-entry ranges can be used for function sections), but # it's the simplest thing to test. If anyone's updating this test at some # point, feel free to replace it with another equivalent test if it's # especially useful, but don't dismiss it as pointless just because it's a bit # weird. b main # CHECK: (lldb) b main # CHECK-NEXT: Breakpoint 1: where = {{.*}}`main + 6 at main.c:2:7