File: debug-types-expressions.test

package info (click to toggle)
llvm-toolchain-9 1%3A9.0.1-16
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 882,436 kB
  • sloc: cpp: 4,167,636; ansic: 714,256; asm: 457,610; python: 155,927; objc: 65,094; sh: 42,856; lisp: 26,908; perl: 7,786; pascal: 7,722; makefile: 6,881; ml: 5,581; awk: 3,648; cs: 2,027; xml: 888; javascript: 381; ruby: 156
file content (53 lines) | stat: -rw-r--r-- 1,396 bytes parent folder | download | duplicates (2)
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
# UNSUPPORTED: system-darwin, system-windows

# Make sure DWARF v4 type units work.
# RUN: %clangxx %S/Inputs/debug-types-expressions.cpp \
# RUN:   -g -gdwarf-4 -fdebug-types-section -o %t4
# RUN: %lldb %t4 -s %s -o exit | FileCheck %s

# Now do the same for DWARF v5.
# RUN: %clangxx %S/Inputs/debug-types-expressions.cpp \
# RUN:   -g -gdwarf-5 -fdebug-types-section -o %t5
# RUN: %lldb %t5 -s %s -o exit | FileCheck %s

# Test type units in dwo files.
# RUN: %clangxx %S/Inputs/debug-types-expressions.cpp \
# RUN:   -g -gdwarf-4 -fdebug-types-section -o %t4dwo
# RUN: %lldb %t4dwo -s %s -o exit | FileCheck %s

# And type units+dwo+dwarf5.
# RUN: %clangxx %S/Inputs/debug-types-expressions.cpp \
# RUN:   -g -gdwarf-5 -fdebug-types-section -o %t5dwo
# RUN: %lldb %t5dwo -s %s -o exit | FileCheck %s

breakpoint set -n foo
process launch

# CHECK: Process {{.*}} stopped

frame variable a
# CHECK-LABEL: frame variable a
# CHECK: (B *) a =

frame variable *a
# CHECK-LABEL: frame variable *a
# CHECK:      (B) *a = {
# CHECK-NEXT:   A = (i = 47)
# CHECK-NEXT:   j = 42
# CHECK-NEXT: }

print a->f()
# CHECK-LABEL: print a->f()
# CHECK: (int) $0 = 47

print ns::A()
# CHECK-LABEL: print ns::A()
# CHECK: (ns::A) $1 = (i = 147)

print ns::A().i + a->i
# CHECK-LABEL: print ns::A().i + a->i
# CHECK: (int) $2 = 194

print ns::A().getA()
# CHECK-LABEL: ns::A().getA()
# CHECK: (A) $3 = (i = 146)