brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.8 KiB · 02c0ef8 Raw
107 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: %clang %cflags -gdwarf-5 %tmain.o -o %tmain.exe3; RUN: llvm-bolt %tmain.exe -o %tmain.exe.bolt --update-debug-sections4; RUN: llvm-dwarfdump --debug-info --debug-names %tmain.exe.bolt > %tlog.txt5; RUN: cat %tlog.txt | FileCheck -check-prefix=BOLT %s6 7;; Tests that BOLT correctly generates .debug_names section with one CU and a local TU.8 9; BOLT: [[OFFSET:0x[0-9a-f]*]]: Type Unit10; BOLT: [[OFFSET1:0x[0-9a-f]*]]: Compile Unit11 12; BOLT:Name Index @ 0x0 {13; BOLT-NEXT:  Header {14; BOLT-NEXT:    Length: 0xAB15; BOLT-NEXT:    Format: DWARF3216; BOLT-NEXT:    Version: 517; BOLT-NEXT:    CU count: 118; BOLT-NEXT:    Local TU count: 119; BOLT-NEXT:    Foreign TU count: 020; BOLT-NEXT:    Bucket count: 421; BOLT-NEXT:    Name count: 422; BOLT-NEXT:    Abbreviations table size: 0x2523; BOLT-NEXT:    Augmentation: 'BOLT'24; BOLT-NEXT:  }25; BOLT-NEXT:  Compilation Unit offsets [26; BOLT-NEXT:    CU[0]: [[OFFSET1]]27; BOLT-NEXT:  ]28; BOLT-NEXT:  Local Type Unit offsets [29; BOLT-NEXT:    LocalTU[0]: [[OFFSET]]30; BOLT-NEXT:  ]31; BOLT-NEXT:  Abbreviations [32; BOLT-NEXT:    Abbreviation [[ABBREV:0x[0-9a-f]*]] {33; BOLT-NEXT:      Tag: DW_TAG_base_type34; BOLT-NEXT:      DW_IDX_die_offset: DW_FORM_ref435; BOLT-NEXT:      DW_IDX_parent: DW_FORM_flag_present36; BOLT-NEXT:    }37; BOLT-NEXT:    Abbreviation [[ABBREV1:0x[0-9a-f]*]] {38; BOLT-NEXT:      Tag: DW_TAG_structure_type39; BOLT-NEXT:      DW_IDX_type_unit: DW_FORM_data140; BOLT-NEXT:      DW_IDX_die_offset: DW_FORM_ref441; BOLT-NEXT:      DW_IDX_parent: DW_FORM_flag_present42; BOLT-NEXT:    }43; BOLT-NEXT:    Abbreviation [[ABBREV2:0x[0-9a-f]*]] {44; BOLT-NEXT:      Tag: DW_TAG_subprogram45; BOLT-NEXT:      DW_IDX_die_offset: DW_FORM_ref446; BOLT-NEXT:      DW_IDX_parent: DW_FORM_flag_present47; BOLT-NEXT:    }48; BOLT-NEXT:    Abbreviation [[ABBREV3:0x[0-9a-f]*]] {49; BOLT-NEXT:      Tag: DW_TAG_base_type50; BOLT-NEXT:      DW_IDX_type_unit: DW_FORM_data151; BOLT-NEXT:      DW_IDX_die_offset: DW_FORM_ref452; BOLT-NEXT:      DW_IDX_parent: DW_FORM_flag_present53; BOLT-NEXT:    }54; BOLT-NEXT:  ]55; BOLT-NEXT:  Bucket 0 [56; BOLT-NEXT:    Name 1 {57; BOLT-NEXT:      Hash: 0xB88803058; BOLT-NEXT:      String: {{.+}} "int"59; BOLT-NEXT:      Entry @ {{.+}} {60; BOLT-NEXT:        Abbrev: [[ABBREV]]61; BOLT-NEXT:        Tag: DW_TAG_base_type62; BOLT-NEXT:        DW_IDX_die_offset: 0x0000003f63; BOLT-NEXT:        DW_IDX_parent: <parent not indexed>64; BOLT-NEXT:      }65; BOLT-NEXT:    }66; BOLT-NEXT:    Name 2 {67; BOLT-NEXT:      Hash: 0xF73809C68; BOLT-NEXT:      String: {{.+}} "Foo2a"69; BOLT-NEXT:      Entry @ {{.+}} {70; BOLT-NEXT:        Abbrev: [[ABBREV1]]71; BOLT-NEXT:        Tag: DW_TAG_structure_type72; BOLT-NEXT:        DW_IDX_type_unit: 0x0073; BOLT-NEXT:        DW_IDX_die_offset: 0x0000002374; BOLT-NEXT:        DW_IDX_parent: <parent not indexed>75; BOLT-NEXT:      }76; BOLT-NEXT:    }77; BOLT-NEXT:  ]78; BOLT-NEXT:  Bucket 1 [79; BOLT-NEXT:    EMPTY80; BOLT-NEXT:  ]81; BOLT-NEXT:  Bucket 2 [82; BOLT-NEXT:    Name 3 {83; BOLT-NEXT:      Hash: 0x7C9A7F6A84; BOLT-NEXT:      String: {{.+}} "main"85; BOLT-NEXT:      Entry @ {{.+}} {86; BOLT-NEXT:        Abbrev: [[ABBREV2]]87; BOLT-NEXT:        Tag: DW_TAG_subprogram88; BOLT-NEXT:        DW_IDX_die_offset: 0x0000002489; BOLT-NEXT:        DW_IDX_parent: <parent not indexed>90; BOLT-NEXT:      }91; BOLT-NEXT:    }92; BOLT-NEXT:  ]93; BOLT-NEXT:  Bucket 3 [94; BOLT-NEXT:    Name 4 {95; BOLT-NEXT:      Hash: 0x7C95206396; BOLT-NEXT:      String: {{.+}} "char"97; BOLT-NEXT:      Entry @ {{.+}} {98; BOLT-NEXT:        Abbrev: [[ABBREV3]]99; BOLT-NEXT:        Tag: DW_TAG_base_type100; BOLT-NEXT:        DW_IDX_type_unit: 0x00101; BOLT-NEXT:        DW_IDX_die_offset: 0x00000038102; BOLT-NEXT:        DW_IDX_parent: <parent not indexed>103; BOLT-NEXT:      }104; BOLT-NEXT:    }105; BOLT-NEXT:  ]106; BOLT-NEXT:}107