File: inline-record.test

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-16
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,496,368 kB
  • sloc: cpp: 5,593,980; ansic: 986,873; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,547; xml: 953; cs: 573; fortran: 567
file content (56 lines) | stat: -rw-r--r-- 3,289 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# RUN: yaml2obj %S/Inputs/basic-elf.yaml -o %T/inline-record.out
# RUN: %lldb %T/inline-record.out -o "target symbols add -s inline-record.out %S/Inputs/inline-record.syms" \
# RUN:   -s %s | FileCheck --match-full-lines %s

# CHECK-LABEL: (lldb) image lookup -a 0x400010 -v
# CHECK:       Summary: inline-record.out`f1 [inlined] inlined_f1 at a.c:3
# CHECK-NEXT:           inline-record.out`f1 at a.c:8
# CHECK:      Function: id = {0x00000000}, name = "f1", range = [0x0000000000400010-0x0000000000400020)
# CHECK-NEXT:   Blocks: id = {0x00000000}, range = [0x00400010-0x00400020)
# CHECK-NEXT:           id = {0x00000010}, ranges = [0x00400010-0x00400015)[0x00400017-0x0040001b), name = "inlined_f1"

# CHECK-LABEL: (lldb) image lookup -a 0x400016 -v
# CHECK:       Summary: inline-record.out`f1 + 6 at a.c:3
# CHECK-NOT:            inline-record.out`f1
# CHECK:      Function: id = {0x00000000}, name = "f1", range = [0x0000000000400010-0x0000000000400020)
# CHECK-NEXT:   Blocks: id = {0x00000000}, range = [0x00400010-0x00400020)

# CHECK-LABEL: (lldb) image lookup -a 0x400023 -v
# CHECK:      Summary: inline-record.out`f2 + 3 [inlined] inlined_f2 at b.c:2
# CHECK-NEXT:          inline-record.out`f2 + 3 [inlined] inlined_f1 at b.c:4
# CHECK-NEXT:          inline-record.out`f2 + 3 at a.c:3
# CHECK:      Function: id = {0x00000001}, name = "f2", range = [0x0000000000400020-0x0000000000400030)
# CHECK-NEXT:   Blocks: id = {0x00000001}, range = [0x00400020-0x00400030)
# CHECK-NEXT:           id = {0x00000043}, range = [0x00400023-0x0040002d), name = "inlined_f1"
# CHECK-NEXT:           id = {0x00000057}, range = [0x00400023-0x00400028), name = "inlined_f2"

# CHECK-LABEL: (lldb) image lookup -a 0x400029 -v
# CHECK:      Summary: inline-record.out`f2 + 9 [inlined] inlined_f1 + 6 at b.c:2
# CHECK-NEXT:          inline-record.out`f2 + 3 at a.c:3
# CHECK:      Function: id = {0x00000001}, name = "f2", range = [0x0000000000400020-0x0000000000400030)
# CHECK-NEXT:   Blocks: id = {0x00000001}, range = [0x00400020-0x00400030)
# CHECK-NEXT:           id = {0x00000043}, range = [0x00400023-0x0040002d), name = "inlined_f1"

# CHECK-LABEL: (lldb) image lookup -a 0x400030 -v
# CHECK:       Summary: inline-record.out`f3 [inlined] inlined_f1 at b.c:3
# CHECK-NEXT:           inline-record.out`f3 at 3
# CHECK:      Function: id = {0x00000002}, name = "f3", range = [0x0000000000400030-0x0000000000400040)
# CHECK-NEXT:   Blocks: id = {0x00000002}, range = [0x00400030-0x00400040)
# CHECK-NEXT:           id = {0x00000085}, range = [0x00400030-0x00400035), name = "inlined_f1"


# CHECK-LABEL: (lldb) image lookup -a 0x400035 -v
# CHECK:      Summary: inline-record.out`f3 + 5 [inlined]  at b.c:3
# CHECK-NEXT:          inline-record.out`f3 + 5 at a.c:3
# CHECK:      Function: id = {0x00000002}, name = "f3", range = [0x0000000000400030-0x0000000000400040)
# CHECK-NEXT:   Blocks: id = {0x00000002}, range = [0x00400030-0x00400040)
# CHECK-NEXT:           id = {0x0000009b}, range = [0x00400035-0x0040003a)

image lookup -a 0x400010 -v
image lookup -a 0x400016 -v
image lookup -a 0x400023 -v
image lookup -a 0x400029 -v
# Folling addresses are inside INLINE records that have file index or origin index out of range.
image lookup -a 0x400030 -v
image lookup -a 0x400035 -v
exit