2017-09-12 07:05:20 +08:00
|
|
|
RUN: llvm-dwarfdump -v %p/Inputs/dwarfdump-objc.x86_64.o | FileCheck %s
|
2017-07-26 08:52:31 +08:00
|
|
|
RUN: not llvm-dwarfdump -verify %p/Inputs/dwarfdump-objc.x86_64.o | FileCheck %s --check-prefix=VERIFY
|
2014-11-15 00:15:53 +08:00
|
|
|
|
|
|
|
Gather some DIE indexes to verify the accelerator table contents.
|
|
|
|
CHECK: .debug_info contents
|
|
|
|
CHECK: [[TESTINTERFACE:0x[0-9a-f]*]]:{{.*}}DW_TAG_structure_type
|
|
|
|
CHECK-NOT: DW_TAG
|
|
|
|
CHECK: DW_AT_name{{.*}}"TestInterface"
|
|
|
|
CHECK: [[READONLY:0x[0-9a-f]*]]:{{.*}}DW_TAG_subprogram
|
|
|
|
CHECK-NOT: DW_TAG
|
|
|
|
CHECK: DW_AT_name{{.*}}"-[TestInterface ReadOnly]"
|
|
|
|
CHECK: [[ASSIGN:0x[0-9a-f]*]]:{{.*}}DW_TAG_subprogram
|
|
|
|
CHECK-NOT: DW_TAG
|
|
|
|
CHECK: DW_AT_name{{.*}}"-[TestInterface Assign]"
|
|
|
|
CHECK: [[SETASSIGN:0x[0-9a-f]*]]:{{.*}}DW_TAG_subprogram
|
|
|
|
CHECK-NOT: DW_TAG
|
|
|
|
CHECK: DW_AT_name{{.*}}"-[TestInterface setAssign:]"
|
|
|
|
|
|
|
|
|
|
|
|
Check that the section header is printed correclty.
|
|
|
|
CHECK: .apple_names contents:
|
2018-01-29 19:33:17 +08:00
|
|
|
CHECK: Magic: 0x48415348
|
|
|
|
CHECK: Version: 0x1
|
|
|
|
CHECK: Hash function: 0x0
|
|
|
|
CHECK: Bucket count: 21
|
|
|
|
CHECK: Hashes count: 42
|
|
|
|
CHECK: HeaderData length: 12
|
|
|
|
CHECK: DIE offset base: 0
|
|
|
|
CHECK: Number of atoms: 1
|
|
|
|
|
|
|
|
CHECK: Atom 0 {
|
|
|
|
CHECK-NEXT: Type: DW_ATOM_die_offset
|
|
|
|
CHECK-NEXT: Form: DW_FORM_data4
|
2014-11-15 00:15:53 +08:00
|
|
|
|
2016-07-14 08:41:18 +08:00
|
|
|
Check that the accelerators point to the right DIEs.
|
2018-01-29 19:33:17 +08:00
|
|
|
CHECK: String:{{.*}}"-[TestInterface ReadOnly]"
|
|
|
|
CHECK-NOT: String
|
|
|
|
CHECK: Atom[0]: [[READONLY]]
|
2016-07-14 08:41:18 +08:00
|
|
|
|
2014-11-15 00:15:53 +08:00
|
|
|
Check that empty buckets are handled correctly.
|
2018-01-29 19:33:17 +08:00
|
|
|
CHECK: Bucket 3
|
2016-07-14 08:41:18 +08:00
|
|
|
CHECK: EMPTY
|
2018-01-29 19:33:17 +08:00
|
|
|
CHECK: Bucket 4
|
2014-11-15 00:15:53 +08:00
|
|
|
|
|
|
|
Check that the accelerators point to the right DIEs.
|
2018-01-29 19:33:17 +08:00
|
|
|
CHECK: String:{{.*}}"-[TestInterface Assign]"
|
|
|
|
CHECK-NOT: String
|
|
|
|
CHECK: Atom[0]: [[ASSIGN]]
|
|
|
|
CHECK: String:{{.*}}"-[TestInterface setAssign:]"
|
|
|
|
CHECK-NOT: String
|
|
|
|
CHECK: Atom[0]: [[SETASSIGN]]
|
2014-11-15 00:15:53 +08:00
|
|
|
|
|
|
|
Check that types are referenced correctly.
|
|
|
|
CHECK: .apple_types contents:
|
2018-01-29 19:33:17 +08:00
|
|
|
CHECK: String:{{.*}}"TestInterface"
|
|
|
|
CHECK-NOT: String
|
|
|
|
CHECK: Atom[0]: [[TESTINTERFACE]]
|
2014-11-15 00:15:53 +08:00
|
|
|
|
2016-07-14 08:41:18 +08:00
|
|
|
Check that an empty accelerator section is handled correctly.
|
2014-11-15 00:15:53 +08:00
|
|
|
CHECK: .apple_namespaces contents:
|
|
|
|
CHECK-NOT: Magic
|
|
|
|
|
|
|
|
Check ObjC specific accelerators.
|
|
|
|
CHECK: .apple_objc contents:
|
2018-01-29 19:33:17 +08:00
|
|
|
CHECK: String{{.*}}"TestInterface"
|
|
|
|
CHECK-NOT: String
|
|
|
|
CHECK: Atom[0]: [[READONLY]]
|
|
|
|
CHECK: Atom[0]: [[ASSIGN]]
|
|
|
|
CHECK: Atom[0]: [[SETASSIGN]]
|
2017-06-30 04:13:05 +08:00
|
|
|
|
|
|
|
Verify the debug info in the apple_names accelerator table.
|
2017-07-26 08:52:31 +08:00
|
|
|
VERIFY: Verifying .apple_names...
|
|
|
|
VERIFY-NEXT: Verifying .apple_types...
|
|
|
|
VERIFY-NEXT: Verifying .apple_namespaces...
|
2017-12-12 02:22:47 +08:00
|
|
|
VERIFY-NEXT: error: Section too small: cannot read buckets and hashes.
|
2017-07-26 08:52:31 +08:00
|
|
|
VERIFY-NEXT: Verifying .apple_objc...
|
|
|
|
VERIFY-NEXT: Errors detected.
|