File: debug-types-missing-signature.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 (26 lines) | stat: -rw-r--r-- 1,095 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
Create a dangling DW_AT_signature reference by stripping the debug_types
section, and make sure lldb does something reasonable.
RUN: %clangxx -target x86_64-pc-linux %S/Inputs/debug-types-basic.cpp \
RUN:   -g -gdwarf-4 -fdebug-types-section -c -o %t.o
RUN: llvm-objcopy --remove-section=.debug_types %t.o %t


RUN: %lldb %t -b -o "type lookup A" | FileCheck --check-prefix=LOOKUPA %s
LOOKUPA: no type was found matching 'A'

RUN: %lldb %t -b -o "type lookup E" | FileCheck --check-prefix=LOOKUPE %s
LOOKUPE: no type was found matching 'E'

RUN: %lldb %t -b -o "type lookup EC" | FileCheck --check-prefix=LOOKUPEC %s
LOOKUPEC: no type was found matching 'EC'

RUN: %lldb %t -b -o "print (E) 1" 2>&1 | FileCheck --check-prefix=PRINTE %s
PRINTE: use of undeclared identifier 'E'

RUN: %lldb %t -b -o "print (EC) 1" 2>&1 | FileCheck --check-prefix=PRINTEC %s
PRINTEC: use of undeclared identifier 'EC'

RUN: %lldb %t -b -o "target variable a e ec" | FileCheck --check-prefix=VARS %s
VARS: (const (anonymous struct)) a = {}
VARS: (const (anonymous enum)) e = 1
VARS: (const (anonymous enum)) ec = 1