58 lines · plain
1# RUN: mkdir -p %t.dir2# RUN: yaml2obj %S/Inputs/basic-elf.yaml -o %t.dir/inline-record.out3# RUN: %lldb %t.dir/inline-record.out -o "target symbols add -s inline-record.out %S/Inputs/inline-record.syms" \4# RUN: -s %s | FileCheck --match-full-lines %s5 6# CHECK-LABEL: (lldb) image lookup -a 0x400010 -v7# CHECK: Summary: inline-record.out`f1 [inlined] inlined_f1 at a.c:38# CHECK-NEXT: inline-record.out`f1 at a.c:89# CHECK: Function: id = {{.*}}, name = "f1", range = [0x0000000000400010-0x0000000000400020)10# CHECK-NEXT: Blocks: id = {{.*}}, range = [0x00400010-0x00400020)11# CHECK-NEXT: id = {{.*}}, ranges = [0x00400010-0x00400015)[0x00400017-0x0040001b), name = "inlined_f1"12 13# CHECK-LABEL: (lldb) image lookup -a 0x400016 -v14# CHECK: Summary: inline-record.out`f1 + 6 at a.c:315# CHECK-NOT: inline-record.out`f116# CHECK: Function: id = {{.*}}, name = "f1", range = [0x0000000000400010-0x0000000000400020)17# CHECK-NEXT: Blocks: id = {{.*}}, range = [0x00400010-0x00400020)18 19# CHECK-LABEL: (lldb) image lookup -a 0x400023 -v20# CHECK: Summary: inline-record.out`f2 + 3 [inlined] inlined_f2 at b.c:221# CHECK-NEXT: inline-record.out`f2 + 3 [inlined] inlined_f1 at b.c:422# CHECK-NEXT: inline-record.out`f2 + 3 at a.c:323# CHECK: Function: id = {{.*}}, name = "f2", range = [0x0000000000400020-0x0000000000400030)24# CHECK-NEXT: Blocks: id = {{.*}}, range = [0x00400020-0x00400030)25# CHECK-NEXT: id = {{.*}}, range = [0x00400023-0x0040002d), name = "inlined_f1"26# CHECK-NEXT: id = {{.*}}, range = [0x00400023-0x00400028), name = "inlined_f2"27 28# CHECK-LABEL: (lldb) image lookup -a 0x400029 -v29# CHECK: Summary: inline-record.out`f2 + 9 [inlined] inlined_f1 + 6 at b.c:230# CHECK-NEXT: inline-record.out`f2 + 3 at a.c:331# CHECK: Function: id = {{.*}}, name = "f2", range = [0x0000000000400020-0x0000000000400030)32# CHECK-NEXT: Blocks: id = {{.*}}, range = [0x00400020-0x00400030)33# CHECK-NEXT: id = {{.*}}, range = [0x00400023-0x0040002d), name = "inlined_f1"34 35# CHECK-LABEL: (lldb) image lookup -a 0x400030 -v36# CHECK: Summary: inline-record.out`f3 [inlined] inlined_f1 at b.c:337# CHECK-NEXT: inline-record.out`f3 at 338# CHECK: Function: id = {{.*}}, name = "f3", range = [0x0000000000400030-0x0000000000400040)39# CHECK-NEXT: Blocks: id = {{.*}}, range = [0x00400030-0x00400040)40# CHECK-NEXT: id = {{.*}}, range = [0x00400030-0x00400035), name = "inlined_f1"41 42 43# CHECK-LABEL: (lldb) image lookup -a 0x400035 -v44# CHECK: Summary: inline-record.out`f3 + 5 [inlined] at b.c:345# CHECK-NEXT: inline-record.out`f3 + 5 at a.c:346# CHECK: Function: id = {{.*}}, name = "f3", range = [0x0000000000400030-0x0000000000400040)47# CHECK-NEXT: Blocks: id = {{.*}}, range = [0x00400030-0x00400040)48# CHECK-NEXT: id = {{.*}}, range = [0x00400035-0x0040003a)49 50image lookup -a 0x400010 -v51image lookup -a 0x400016 -v52image lookup -a 0x400023 -v53image lookup -a 0x400029 -v54# Folling addresses are inside INLINE records that have file index or origin index out of range.55image lookup -a 0x400030 -v56image lookup -a 0x400035 -v57exit58