Imported Upstream version 5.18.0.167

Former-commit-id: 289509151e0fee68a1b591a20c9f109c3c789d3a
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-10-20 08:25:10 +00:00
parent e19d552987
commit b084638f15
28489 changed files with 184 additions and 3866856 deletions

View File

@@ -1,19 +0,0 @@
RUN: llvm-dwp %p/../Inputs/compress/a.dwo -o %t
RUN: llvm-dwarfdump -v %t | FileCheck %s
REQUIRES: zlib
Simple test built from this input which produces DWARF long enough to be compressed in the .[z]debug_info section:
void f(int a, int b, int c, int d) {
}
Since the compression is pretty orthogonal, we're not trying to test that the
compression library functioned correctly, just that dwp used it to decompress
the section - so test a few simple features and be done with it.
CHECK: .debug_info.dwo contents:
CHECK: Compile Unit:
CHECK: DW_TAG_compile_unit
CHECK: DW_TAG_subprogram
CHECK: DW_TAG_formal_parameter

View File

@@ -1,7 +0,0 @@
RUN: not llvm-dwp %p/../Inputs/compressfail/a.dwo -o %t 2>&1 | FileCheck %s
RUN: not llvm-dwp %p/../Inputs/empty_compressed_section.dwo -o %t 2>&1 | FileCheck %s
RUN: not llvm-dwp %p/../Inputs/invalid_compressed.dwo -o %t 2>&1 | FileCheck %s
REQUIRES: zlib
CHECK: error: failure while decompressing compressed section: '.zdebug_{{.*}}.dwo'

View File

@@ -1,27 +0,0 @@
RUN: not llvm-dwp %p/../Inputs/duplicate/c.dwo %p/../Inputs/duplicate/c.dwo -o %t 2>&1 \
RUN: | FileCheck --check-prefix=DWOS %s
RUN: not llvm-dwp %p/../Inputs/duplicate/c.dwo %p/../Inputs/duplicate/bc.dwp -o %t 2>&1 \
RUN: | FileCheck --check-prefix=2DWP %s
RUN: not llvm-dwp %p/../Inputs/duplicate/ac.dwp %p/../Inputs/duplicate/c.dwo -o %t 2>&1 \
RUN: | FileCheck --check-prefix=1DWP %s
RUN: not llvm-dwp %p/../Inputs/duplicate_dwo_name/c.dwo %p/../Inputs/duplicate_dwo_name/c.dwo -o %t 2>&1 \
RUN: | FileCheck --check-prefix=DWODWOS %s
RUN: not llvm-dwp %p/../Inputs/duplicate_dwo_name/c.dwo %p/../Inputs/duplicate_dwo_name/bc.dwp -o %t 2>&1 \
RUN: | FileCheck --check-prefix=DWO2DWP %s
RUN: not llvm-dwp %p/../Inputs/duplicate_dwo_name/ac.dwp %p/../Inputs/duplicate_dwo_name/c.dwo -o %t 2>&1 \
RUN: | FileCheck --check-prefix=DWO1DWP %s
Build from a, b, and c.c all containing a single void() func by the name of the file.
DWOS: error: Duplicate DWO ID ({{.*}}) in 'c.c' and 'c.c'{{$}}
1DWP: error: Duplicate DWO ID ({{.*}}) in 'c.c' (from '{{.*}}ac.dwp') and 'c.c'{{$}}
2DWP: error: Duplicate DWO ID ({{.*}}) in 'c.c' and 'c.c' (from '{{.*}}bc.dwp'){{$}}
DWODWOS: error: Duplicate DWO ID ({{.*}}) in 'c.c' and 'c.c'{{$}}
DWO1DWP: error: Duplicate DWO ID ({{.*}}) in 'c.c' (from 'c.dwo' in '{{.*}}ac.dwp') and 'c.c'{{$}}
DWO2DWP: error: Duplicate DWO ID ({{.*}}) in 'c.c' and 'c.c' (from 'c.dwo' in '{{.*}}bc.dwp'){{$}}

View File

@@ -1,97 +0,0 @@
REQUIRES: shell
RUN: rm -rf %t
RUN: mkdir %t
RUN: cd %t
RUN: cp %p/../Inputs/dwos_list_from_exec/a.dwo a.dwo
RUN: cp %p/../Inputs/dwos_list_from_exec/b.dwo b.dwo
RUN: cp %p/../Inputs/dwos_list_from_exec/c.dwo c.dwo
RUN: cp %p/../Inputs/dwos_list_from_exec/d.dwo d.dwo
RUN: cp %p/../Inputs/dwos_list_from_exec/e.dwo e.dwo
RUN: cp %p/../Inputs/dwos_list_from_exec/main main
RUN: cp %p/../Inputs/dwos_list_from_exec/libd.so libd.so
RUN: llvm-dwp c.dwo e.dwo -e main -e libd.so -o pkg.dwp
RUN: llvm-dwarfdump -v pkg.dwp | FileCheck %s
Build commands for the test binaries:
clang++ -Xclang -fdebug-compilation-dir -Xclang "./" -g -O0 -gsplit-dwarf a.cpp b.cpp -o main
clang++ -g -O0 -gsplit-dwarf -c c.cpp -o c.o
clang++ -Xclang -fdebug-compilation-dir -Xclang "./" -g -O0 -gsplit-dwarf -fPIC -shared d.cpp -o libd.so
clang++ -g -O0 -gsplit-dwarf -c e.cpp -o e.o
sources:
a.cpp:
void a() {}
b.cpp:
void b() {}
int main() {
return 0;
}
c.cpp:
void c() {}
d.cpp:
void d() {}
e.cpp:
void e() {}
CHECK-LABEL: .debug_abbrev.dwo contents:
CHECK-LABEL: Abbrev table for offset:
CHECK: DW_TAG_compile_unit
CHECK: DW_TAG_subprogram
CHECK-LABEL: Abbrev table for offset:
CHECK: DW_TAG_compile_unit
CHECK: DW_TAG_subprogram
CHECK-LABEL: Abbrev table for offset:
CHECK: DW_TAG_compile_unit
CHECK: DW_TAG_subprogram
CHECK-LABEL: Abbrev table for offset:
CHECK: DW_TAG_compile_unit
CHECK: DW_TAG_subprogram
CHECK-LABEL: Abbrev table for offset:
CHECK: DW_TAG_compile_unit
CHECK: DW_TAG_subprogram
CHECK: .debug_info.dwo contents:
CHECK: [[AOFF:0x[0-9a-f]*]]:
CHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004
CHECK: DW_TAG_compile_unit
CHECK: DW_AT_name {{.*}} "c.cpp"
CHECK: DW_TAG_subprogram
CHECK: DW_AT_name {{.*}} "c"
CHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004
CHECK: DW_TAG_compile_unit
CHECK: DW_AT_name {{.*}} "e.cpp"
CHECK: DW_TAG_subprogram
CHECK: DW_AT_name {{.*}} "e"
CHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004
CHECK: DW_TAG_compile_unit
CHECK: DW_AT_name {{.*}} "a.cpp"
CHECK: DW_TAG_subprogram
CHECK: DW_AT_name {{.*}} "a"
CHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004
CHECK: DW_TAG_compile_unit
CHECK: DW_AT_name {{.*}} "b.cpp"
CHECK: DW_TAG_subprogram
CHECK: DW_AT_name {{.*}} "b"
CHECK: DW_TAG_subprogram
CHECK: DW_AT_name {{.*}} "main"
CHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004
CHECK: DW_TAG_compile_unit
CHECK: DW_AT_name {{.*}} "d.cpp"
CHECK: DW_TAG_subprogram
CHECK: DW_AT_name {{.*}} "d"

View File

@@ -1,8 +0,0 @@
RUN: llvm-dwp %p/../Inputs/empty.dwo -o %t
RUN: llvm-dwarfdump -v %t | FileCheck %s
CHECK: file format
CHECK-NOT: .debug_cu_index
CHECK-NOT: version
CHECK-NOT: .debug_tu_index
CHECK-NOT: version

View File

@@ -1,9 +0,0 @@
RUN: llvm-dwp %p/../Inputs/gcc_type/a.dwo -o %t
RUN: llvm-dwarfdump -v %t | FileCheck %s
RUN: not llvm-dwp %p/../Inputs/gcc_type/a.dwo %p/../Inputs/gcc_type/a.dwo -o %t 2>&1 | FileCheck --check-prefix=DUP %s
CHECK: Type Unit
CHECK: Type Unit
// Check that llvm-dwp can parse DW_FORM_string for CU name
DUP: Duplicate DWO ID ({{.*}}) in 'a.cpp' and 'a.cpp'

View File

@@ -1,3 +0,0 @@
RUN: not llvm-dwp %p/../Inputs/invalid_cu_index/x.dwp -o %t 2>&1 | FileCheck %s
CHECK: error: Failed to parse cu_index

View File

@@ -1,3 +0,0 @@
RUN: not llvm-dwp %p/../Inputs/invalid_string_form.dwo -o %t 2>&1 | FileCheck %s
CHECK: error: string field encoded without DW_FORM_string or DW_FORM_GNU_str_index

View File

@@ -1,4 +0,0 @@
if not 'X86' in config.root.targets:
config.unsupported = True
config.suffixes = ['.test', '.cpp', '.m', '.s']

View File

@@ -1,48 +0,0 @@
RUN: llvm-dwp %p/../Inputs/merge/notypes/c.dwo %p/../Inputs/merge/notypes/ab.dwp -o %t
RUN: llvm-dwarfdump -v %t | FileCheck --check-prefix=CHECK --check-prefix=NOTYP %s
FIXME: For some reason, piping straight from llvm-dwp to llvm-dwarfdump -v doesn't behave well - looks like dwarfdump is reading/closes before dwp has finished.
DWP from a DWO (c.dwo) and a DWP (ab.dwp, created from a.dwo and b.dwo)
Make sure the entries for A and B are updated correctly when read/processed from ab.dwp
a.cpp:
struct foo { };
foo a;
b.cpp:
struct bar { };
void b(bar) {
}
c.cpp:
typedef int baz;
baz c() {
}
CHECK-LABEL: .debug_abbrev.dwo contents:
CHECK-LABEL: Abbrev table for offset:
CHECK: 0x0000[[CAOFF:.*]]
CHECK-LABEL: Abbrev table for offset:
CHECK: 0x0000[[AAOFF:.*]]
CHECK-LABEL: Abbrev table for offset:
CHECK: 0x0000[[BAOFF:.*]]
CHECK: .debug_info.dwo contents:
CHECK: [[COFF:0x[0-9a-f]*]]:
CHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004 abbr_offset =
CHECK: 0x[[CAOFF]] addr_size = 0x08 (next unit at [[AOFF:.*]])
CHECK: DW_AT_GNU_dwo_id {{.*}} ([[DWOC:.*]])
CHECK: [[AOFF]]:
CHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004 abbr_offset =
CHECK: 0x[[AAOFF]] addr_size = 0x08 (next unit at [[BOFF:.*]])
CHECK: DW_AT_GNU_dwo_id {{.*}} ([[DWOA:.*]])
CHECK: [[BOFF]]:
CHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004 abbr_offset =
CHECK: 0x[[BAOFF]] addr_size = 0x08 (next unit at [[XOFF:.*]])
CHECK: DW_AT_GNU_dwo_id {{.*}} ([[DWOB:.*]])
CHECK-LABEL: .debug_cu_index
CHECK: Index Signature INFO ABBREV LINE STR_OFFSETS
CHECK-DAG: [[DWOC]] {{\[}}[[COFF]], [[AOFF]]) [0x0000[[CAOFF]], 0x0000[[AAOFF]]) [0x00000000, 0x00000011) [0x00000000, 0x00000018)
CHECK-DAG: [[DWOA]] {{\[}}[[AOFF]], [[BOFF]]) [0x0000[[AAOFF]], 0x0000[[BAOFF]]) [0x00000011, 0x00000022) [0x00000018, 0x00000028)
CHECK-DAG: [[DWOB]] {{\[}}[[BOFF]], [[XOFF]]) [0x0000[[BAOFF]], 0x000000c3) [0x00000022, 0x00000033) [0x00000028, 0x0000003c)

View File

@@ -1,3 +0,0 @@
RUN: not llvm-dwp %p/../Inputs/missing_tu_index/x.dwp -o %t 2>&1 | FileCheck %s
CHECK: error: Failed to parse tu_index

View File

@@ -1,3 +0,0 @@
RUN: not llvm-dwp %p/../Inputs/multiple_type_sections.dwp -o %t 2>&1 | FileCheck %s
CHECK: error: multiple type unit sections in .dwp file

View File

@@ -1,5 +0,0 @@
RUN: not llvm-dwp %p/../Inputs/compress/a.dwo -o %t 2>&1 | FileCheck %s
REQUIRES: nozlib
CHECK: error: failure while decompressing compressed section: '.zdebug_{{.*}}.dwo', zlib is not available

View File

@@ -1,3 +0,0 @@
RUN: not llvm-dwp %p/../Inputs/non_cu_top_level.dwo -o %t 2>&1 | FileCheck %s
CHECK: error: top level DIE is not a compile unit

View File

@@ -1,97 +0,0 @@
RUN: llvm-dwp %p/../Inputs/simple/notypes/a.dwo %p/../Inputs/simple/notypes/b.dwo -o %t
RUN: llvm-dwarfdump -v %t | FileCheck --check-prefix=CHECK --check-prefix=NOTYP %s
RUN: llvm-objdump -h %t | FileCheck --check-prefix=NOTYPOBJ %s
UN: llvm-dwp %p/../Inputs/simple/types/a.dwo %p/../Inputs/simple/types/b.dwo -o %t
UN: llvm-dwarfdump -v %t | FileCheck --check-prefix=CHECK --check-prefix=TYPES %s
FIXME: For some reason, piping straight from llvm-dwp to llvm-dwarfdump -v doesn't behave well - looks like dwarfdump is reading/closes before dwp has finished.
DWP from non-type-unit debug info for these two translation units:
a.cpp:
struct foo { };
foo a;
b.cpp:
struct bar { };
void b(bar) {
}
CHECK-LABEL: .debug_abbrev.dwo contents:
CHECK-LABEL: Abbrev table for offset:
CHECK: 0x0000[[AAOFF:.*]]
CHECK: DW_TAG_compile_unit
CHECK: DW_TAG_variable
CHECK: DW_TAG_structure_type
CHECK-LABEL: Abbrev table for offset:
CHECK: 0x0000[[BAOFF:.*]]
CHECK: DW_TAG_compile_unit
CHECK: DW_TAG_structure_type
CHECK: DW_TAG_subprogram
CHECK: DW_TAG_formal_parameter
CHECK: .debug_info.dwo contents:
CHECK: [[AOFF:0x[0-9a-f]*]]:
CHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004 abbr_offset =
CHECK: 0x[[AAOFF]] addr_size = 0x08 (next unit at [[BOFF:.*]])
CHECK: DW_TAG_compile_unit
CHECK: DW_AT_name {{.*}} "a.cpp"
CHECK: DW_AT_GNU_dwo_id {{.*}} ([[DWOA:.*]])
CHECK: DW_TAG_variable
CHECK: DW_AT_name {{.*}} "a"
CHECK: DW_TAG_structure_type
NOTYP: DW_AT_name {{.*}} "foo"
TYPES: DW_AT_signature {{.*}} ([[FOOSIG:.*]])
CHECK: [[BOFF]]:
CHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004 abbr_offset =
CHECK: 0x[[BAOFF]] addr_size = 0x08 (next unit at [[XOFF:.*]])
CHECK: DW_AT_name {{.*}} "b.cpp"
CHECK: DW_AT_GNU_dwo_id {{.*}} ([[DWOB:.*]])
CHECK: DW_TAG_structure_type
NOTYP: DW_AT_name {{.*}} "bar"
TYPES: DW_AT_signature {{.*}} ([[BARSIG:.*]])
CHECK: DW_TAG_subprogram
CHECK: DW_AT_name {{.*}} "b"
CHECK: DW_TAG_formal_parameter
NOTYP-NOT: .debug_types.dwo contents:
TYPES-LABEL: .debug_types.dwo contents:
TYPES: [[FOOUOFF:0x[0-9a-f]*]]:
TYPES-LABEL: Type Unit: length = 0x00000020 version = 0x0004 abbr_offset =
TYPES: 0x[[AAOFF]] addr_size = 0x08 type_signature = [[FOOSIG]] type_offset = 0x[[FOOOFF:.*]] (next unit at [[BARUOFF:.*]])
TYPES: DW_TAG_type_unit
TYPES: [[FOOOFF]]: DW_TAG_structure_type
TYPES: DW_AT_name {{.*}} "foo"
TYPES: [[BARUOFF]]:
TYPES-LABEL: Type Unit: length = 0x00000020 version = 0x0004 abbr_offset =
TYPES: 0x[[BAOFF]] addr_size = 0x08 type_signature = [[BARSIG]] type_offset = 0x001e (next unit at [[XUOFF:.*]])
TYPES: DW_TAG_type_unit
TYPES: 0x00000042: DW_TAG_structure_type
TYPES: DW_AT_name {{.*}} "bar"
CHECK-LABEL: .debug_cu_index contents:
CHECK: Index Signature INFO ABBREV LINE STR_OFFSETS
TYPES: 1 [[DWOA]] {{\[}}[[AOFF]], [[BOFF]]) [0x0000[[AAOFF]], 0x0000[[BAOFF]]) [0x00000000, 0x0000001a) [0x00000000, 0x00000010)
TYPES: 3 [[DWOB]] {{\[}}[[BOFF]], [[XOFF]]) [0x0000[[BAOFF]], 0x00000099) [0x0000001a, 0x00000034) [0x00000010, 0x00000024)
NOTYP: 3 [[DWOA]] {{\[}}[[AOFF]], [[BOFF]]) [0x0000[[AAOFF]], 0x0000[[BAOFF]]) [0x00000000, 0x00000011) [0x00000000, 0x00000010)
NOTYP: 4 [[DWOB]] {{\[}}[[BOFF]], [[XOFF]]) [0x0000[[BAOFF]], 0x00000075) [0x00000011, 0x00000022) [0x00000010, 0x00000024)
CHECK-NOT: .debug_tu_index contents:
TYPES: Index Signature TYPES ABBREV LINE STR_OFFSETS
TYPES: 1 [[FOOSIG]] {{\[}}[[FOOUOFF]], [[BARUOFF]]) [0x0000[[AAOFF]], 0x0000[[BAOFF]]) [0x00000000, 0x0000001a) [0x00000000, 0x00000010)
TYPES: 4 [[BARSIG]] {{\[}}[[BARUOFF]], [[XUOFF]]) [0x0000[[BAOFF]], 0x00000099) [0x0000001a, 0x00000034) [0x00000010, 0x00000024)
Ensure we do not create a debug_tu_index, even an empty or malformed one.
NOTYPOBJ-NOT: .debug_tu_index
CHECK-LABEL: .debug_str.dwo contents:
CHECK: "clang version
CHECK: 0x[[ACPP:.*]]: "a.cpp"
CHECK-NOT: "clang version
CHECK: 0x[[BCPP:.*]]: "b.cpp"
CHECK-LABEL: .debug_str_offsets.dwo contents:
CHECK: : 00000000
CHECK: : [[ACPP]]
CHECK: : 00000000
CHECK: : [[BCPP]]

View File

@@ -1,38 +0,0 @@
RUN: llvm-dwp %p/../Inputs/type_dedup/a.dwo %p/../Inputs/type_dedup/b.dwo -o %t
RUN: llvm-dwarfdump -v %t | FileCheck %s
RUN: llvm-dwp %p/../Inputs/type_dedup/b.dwo -o %tb.dwp
RUN: llvm-dwp %p/../Inputs/type_dedup/a.dwo %tb.dwp -o %t
RUN: llvm-dwarfdump -v %t | FileCheck %s
a.cpp:
struct common { };
common a1;
struct adistinct { };
adistinct a2;
b.cpp:
struct common { };
common b1;
struct bdistinct { };
bdistinct b2;
CHECK-LABEL: .debug_types.dwo contents:
CHECK: [[COMMONUOFF:0x[0-9a-f]*]]:
CHECK-LABEL: Type Unit: length = 0x00000020 version = 0x0004 abbr_offset =
CHECK: 0x0000 addr_size = 0x08 name = 'common' type_signature = [[COMMONSIG:0x[0-9a-f]*]] type_offset = 0x[[COMMONOFF:.*]] (next unit at [[AUOFF:.*]])
CHECK: DW_TAG_type_unit
CHECK: [[COMMONOFF]]: DW_TAG_structure_type
CHECK: DW_AT_name {{.*}} "common"
CHECK: [[AUOFF]]:
CHECK-LABEL: Type Unit: length = 0x00000020 version = 0x0004 abbr_offset =
CHECK: 0x0000 addr_size = 0x08 name = 'adistinct' type_signature = [[ASIG:0x[0-9a-f]*]] type_offset = 0x[[AOFF:.*]] (next unit at [[BUOFF:.*]])
CHECK: DW_TAG_type_unit
CHECK: 0x00000042: DW_TAG_structure_type
CHECK: DW_AT_name {{.*}} "adistinct"
CHECK: [[BUOFF]]:
CHECK-LABEL: Type Unit: length = 0x00000020 version = 0x0004 abbr_offset =
CHECK: 0x{{.*}} addr_size = 0x08 name = 'bdistinct' type_signature = [[BSIG:0x[0-9a-f]*]] type_offset = 0x[[BOFF:.*]] (next unit at [[XUOFF:.*]])
CHECK: DW_TAG_type_unit
CHECK: 0x00000066: DW_TAG_structure_type
CHECK: DW_AT_name {{.*}} "bdistinct"
CHECK-NOT: Type Unit