140 lines · plain
1; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-types-debug-names-main.s -o %tmain.o2; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-types-debug-names-helper.s -o %thelper.o3; RUN: %clang %cflags -gdwarf-5 %tmain.o %thelper.o -o %tmain.exe4; RUN: llvm-bolt %tmain.exe -o %tmain.exe.bolt --update-debug-sections --debug-thread-count=4 --cu-processing-batch-size=45; RUN: llvm-dwarfdump --debug-info --debug-names %tmain.exe.bolt > %tlog.txt6; RUN: cat %tlog.txt | FileCheck -check-prefix=BOLT %s7 8;; Tests that BOLT correctly generates .debug_names section with two CUs and a local TU.9 10; BOLT: [[OFFSET:0x[0-9a-f]*]]: Type Unit11; BOLT: [[OFFSET1:0x[0-9a-f]*]]: Compile Unit12; BOLT: [[OFFSET2:0x[0-9a-f]*]]: Compile Unit13 14 15; BOLT: Name Index @ 0x0 {16; BOLT: Header {17; BOLT: Length: 0xE918; BOLT: Format: DWARF3219; BOLT: Version: 520; BOLT: CU count: 221; BOLT: Local TU count: 122; BOLT: Foreign TU count: 023; BOLT: Bucket count: 624; BOLT: Name count: 625; BOLT: Abbreviations table size: 0x2926; BOLT: Augmentation: 'BOLT'27; BOLT: }28; BOLT: Compilation Unit offsets [29; BOLT: CU[0]: [[OFFSET1]]30; BOLT: CU[1]: [[OFFSET2]]31; BOLT: ]32; BOLT: Local Type Unit offsets [33; BOLT: LocalTU[0]: [[OFFSET]]34; BOLT: ]35; BOLT: Abbreviations [36; BOLT: Abbreviation [[ABBREV:0x[0-9a-f]*]] {37; BOLT: Tag: DW_TAG_structure_type38; BOLT: DW_IDX_type_unit: DW_FORM_data139; BOLT: DW_IDX_die_offset: DW_FORM_ref440; BOLT: DW_IDX_parent: DW_FORM_flag_present41; BOLT: }42; BOLT: Abbreviation [[ABBREV1:0x[0-9a-f]*]] {43; BOLT: Tag: DW_TAG_subprogram44; BOLT: DW_IDX_compile_unit: DW_FORM_data145; BOLT: DW_IDX_die_offset: DW_FORM_ref446; BOLT: DW_IDX_parent: DW_FORM_flag_present47; BOLT: }48; BOLT: Abbreviation [[ABBREV2:0x[0-9a-f]*]] {49; BOLT: Tag: DW_TAG_base_type50; BOLT: DW_IDX_compile_unit: DW_FORM_data151; BOLT: DW_IDX_die_offset: DW_FORM_ref452; BOLT: DW_IDX_parent: DW_FORM_flag_present53; BOLT: }54; BOLT: Abbreviation [[ABBREV3:0x[0-9a-f]*]] {55; BOLT: Tag: DW_TAG_base_type56; BOLT: DW_IDX_type_unit: DW_FORM_data157; BOLT: DW_IDX_die_offset: DW_FORM_ref458; BOLT: DW_IDX_parent: DW_FORM_flag_present59; BOLT: }60; BOLT: ]61; BOLT: Bucket 0 [62; BOLT: Name 1 {63; BOLT: Hash: 0xF73809C64; BOLT: String: {{.+}} "Foo2a"65; BOLT: Entry @ {{.+}} {66; BOLT: Abbrev: [[ABBREV]]67; BOLT: Tag: DW_TAG_structure_type68; BOLT: DW_IDX_type_unit: 0x0069; BOLT: DW_IDX_die_offset: 0x0000002370; BOLT: DW_IDX_parent: <parent not indexed>71; BOLT: }72; BOLT: }73; BOLT: ]74; BOLT: Bucket 1 [75; BOLT: Name 2 {76; BOLT: Hash: 0xB5063D0B77; BOLT: String: {{.+}} "_Z3foov"78; BOLT: Entry @ {{.+}} {79; BOLT: Abbrev: [[ABBREV1]]80; BOLT: Tag: DW_TAG_subprogram81; BOLT: DW_IDX_compile_unit: 0x0182; BOLT: DW_IDX_die_offset: 0x0000002483; BOLT: DW_IDX_parent: <parent not indexed>84; BOLT: }85; BOLT: }86; BOLT: ]87; BOLT: Bucket 2 [88; BOLT: Name 3 {89; BOLT: Hash: 0xB88803090; BOLT: String: {{.+}} "int"91; BOLT: Entry @ {{.+}} {92; BOLT: Abbrev: [[ABBREV2]]93; BOLT: Tag: DW_TAG_base_type94; BOLT: DW_IDX_compile_unit: 0x0195; BOLT: DW_IDX_die_offset: 0x0000004096; BOLT: DW_IDX_parent: <parent not indexed>97; BOLT: }98; BOLT: }99; BOLT: ]100; BOLT: Bucket 3 [101; BOLT: Name 4 {102; BOLT: Hash: 0xB887389103; BOLT: String: {{.+}} "foo"104; BOLT: Entry @ {{.+}} {105; BOLT: Abbrev: [[ABBREV1]]106; BOLT: Tag: DW_TAG_subprogram107; BOLT: DW_IDX_compile_unit: 0x01108; BOLT: DW_IDX_die_offset: 0x00000024109; BOLT: DW_IDX_parent: <parent not indexed>110; BOLT: }111; BOLT: }112; BOLT: ]113; BOLT: Bucket 4 [114; BOLT: Name 5 {115; BOLT: Hash: 0x7C9A7F6A116; BOLT: String: {{.+}} "main"117; BOLT: Entry @ {{.+}} {118; BOLT: Abbrev: [[ABBREV1]]119; BOLT: Tag: DW_TAG_subprogram120; BOLT: DW_IDX_compile_unit: 0x00121; BOLT: DW_IDX_die_offset: 0x00000024122; BOLT: DW_IDX_parent: <parent not indexed>123; BOLT: }124; BOLT: }125; BOLT: ]126; BOLT: Bucket 5 [127; BOLT: Name 6 {128; BOLT: Hash: 0x7C952063129; BOLT: String: {{.+}} "char"130; BOLT: Entry @ {{.+}} {131; BOLT: Abbrev: [[ABBREV3]]132; BOLT: Tag: DW_TAG_base_type133; BOLT: DW_IDX_type_unit: 0x00134; BOLT: DW_IDX_die_offset: 0x00000038135; BOLT: DW_IDX_parent: <parent not indexed>136; BOLT: }137; BOLT: }138; BOLT: ]139; BOLT: }140