brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.9 KiB · 5a83dba Raw
175 lines · plain
1## Show that llvm-dwarfdump dumps the whole .debug_line section when2## --debug-line is specified.3 4# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux -o %t.o5# RUN: llvm-dwarfdump --debug-line %t.o | FileCheck %s --match-full-lines6 7# CHECK:      .debug_line contents:8# CHECK-NEXT: debug_line[0x00000000]9# CHECK-NEXT: Line table prologue:10# CHECK-NEXT:     total_length: 0x0000006911# CHECK-NEXT:           format: DWARF3212# CHECK-NEXT:          version: 513# CHECK-NEXT:     address_size: 814# CHECK-NEXT:  seg_select_size: 015# CHECK-NEXT:  prologue_length: 0x0000004c16# CHECK-NEXT:  min_inst_length: 117# CHECK-NEXT: max_ops_per_inst: 118# CHECK-NEXT:  default_is_stmt: 119# CHECK-NEXT:        line_base: -520# CHECK-NEXT:       line_range: 721# CHECK-NEXT:      opcode_base: 1422# CHECK-NEXT: standard_opcode_lengths[DW_LNS_copy] = 023# CHECK-NEXT: standard_opcode_lengths[DW_LNS_advance_pc] = 124# CHECK-NEXT: standard_opcode_lengths[DW_LNS_advance_line] = 125# CHECK-NEXT: standard_opcode_lengths[DW_LNS_set_file] = 126# CHECK-NEXT: standard_opcode_lengths[DW_LNS_set_column] = 127# CHECK-NEXT: standard_opcode_lengths[DW_LNS_negate_stmt] = 028# CHECK-NEXT: standard_opcode_lengths[DW_LNS_set_basic_block] = 029# CHECK-NEXT: standard_opcode_lengths[DW_LNS_const_add_pc] = 030# CHECK-NEXT: standard_opcode_lengths[DW_LNS_fixed_advance_pc] = 131# CHECK-NEXT: standard_opcode_lengths[DW_LNS_set_prologue_end] = 032# CHECK-NEXT: standard_opcode_lengths[DW_LNS_set_epilogue_begin] = 033# CHECK-NEXT: standard_opcode_lengths[DW_LNS_set_isa] = 134# CHECK-NEXT: standard_opcode_lengths[DW_LNS_unknown_d] = 035# CHECK-NEXT: include_directories[  0] = "dir1/dir2"36# CHECK-NEXT: file_names[  0]:37# CHECK-NEXT:            name: "file1.c"38# CHECK-NEXT:       dir_index: 239# CHECK-NEXT:        mod_time: 0x1234567840# CHECK-NEXT:          length: 0x0000001041# CHECK-EMPTY:42# CHECK-NEXT: Address            Line   Column File   ISA Discriminator OpIndex Flags43# CHECK-NEXT: ------------------ ------ ------ ------ --- ------------- ------- -------------44# CHECK-NEXT: 0x0000000000000002      1      0      1   0             0       0  is_stmt45# CHECK-NEXT: 0x0000000000000002      1      4      3   0             0       0  is_stmt46# CHECK-NEXT: 0x0000000000000024      1      4      3   5             6       0  basic_block prologue_end epilogue_begin end_sequence47# CHECK-EMPTY:48# CHECK-NEXT: debug_line[0x0000006d]49# CHECK-NEXT: Line table prologue:50# CHECK-NEXT:     total_length: 0x0000001b51# CHECK-NEXT:           format: DWARF3252# CHECK-NEXT:          version: 453# CHECK-NEXT:  prologue_length: 0x0000001554# CHECK-NEXT:  min_inst_length: 255# CHECK-NEXT: max_ops_per_inst: 456# CHECK-NEXT:  default_is_stmt: 057# CHECK-NEXT:        line_base: 4258# CHECK-NEXT:       line_range: 1059# CHECK-NEXT:      opcode_base: 260# CHECK-NEXT: standard_opcode_lengths[DW_LNS_copy] = 4261# CHECK-NEXT: include_directories[  1] = "baz"62# CHECK-NEXT: file_names[  1]:63# CHECK-NEXT:            name: "foo.c"64# CHECK-NEXT:       dir_index: 165# CHECK-NEXT:        mod_time: 0x0000001166# CHECK-NEXT:          length: 0x0000002267# CHECK-EMPTY:68# CHECK-NEXT: debug_line[0x0000008c]69 70.section .debug_line,"",@progbits71    .long .Lunit0_end - .Lunit0_begin ## unit_length72.Lunit0_begin:73    .short 5 ## version74    .byte 8  ## address_size75    .byte 0  ## segment_selector_size76    .long .Lheader0_end - .Lheader0_begin ## header_length77.Lheader0_begin:78    .byte 1  ## minimum_instruction_length79    .byte 1  ## maximum_operations_per_instruction80    .byte 1  ## default_is_stmt81    .byte -5 ## line_base82    .byte 7  ## line_range83    ## Use an opcode_base > than the last standard opcode to show that unknown84    ## standard opcodes can be handled.85    .byte 14 ## opcode_base86    .byte 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0 ## standard_opcode_lengths87    .byte 2  ## directory_entry_format_count88    ## Use two formats to show that only the path is included in the output.89    .byte 0x1, 0x8 ## DW_LNCT_path, DW_FORM_string90    .byte 0x4, 0x5 ## DW_LNCT_size, DW_FORM_data291    .byte 1  ## directories_count92    .asciz "dir1/dir2" ## directory entry 093    .short 0x123494    .byte 4  ## file_name_entry_format_count95    .byte 0x4, 0x1E ## DW_LNCT_MD5, DW_FORM_data1696    .byte 0x3, 0x6  ## DW_LNCT_timestamp, DW_FORM_data497    .byte 0x2, 0xB  ## DW_LNCT_directory_index, DW_FORM_data198    .byte 0x1, 0x8  ## DW_LNCT_path, DW_FORM_string99    .byte 1  ## file_names_count100    .quad 0x1111222233334444, 0x5555666677778888 ## file name entry 0101    .long 0x12345678102    .byte 2103    .asciz "file1.c"104.Lheader0_end:105    .byte 0x21 ## Special opcode - shows line printed after special opcode.106    .byte 0x4  ## DW_LNS_set_file - shows file can be changed to an arbitrary value.107    .byte 3108    .byte 0x5  ## DW_LNS_set_column - shows column can be changed.109    .byte 4110    .byte 0x1  ## DW_LNS_copy - shows line printed after copy opcode.111    .byte 0x8  ## DW_LNS_const_add_pc - shows address can be changed.112    .byte 0xC  ## DW_LNS_set_isa - shows isa register value can be changed.113    .byte 5114    .byte 0, 0x2, 0x4 ## DW_LNE_set_discriminator - shows discriminator can be changed.115    .byte 6116    ## These lines all show that the printed boolean register values can be changed.117    .byte 0x6  ## DW_LNS_negate_stmt118    .byte 0x7  ## DW_LNS_set_basic_block119    .byte 0xA  ## DW_LNS_set_prologue_end120    .byte 0xB  ## DW_LNS_set_epilogue_begin121 122    .byte 0xD  ## DW_LNS_unknown - shows that unknown opcodes do not affect state.123    .byte 0, 0x1, 0x1 ## DW_LNE_end_sequence124.Lunit0_end:125 126## Second line table program with version 4 and no sequences.127    .long .Lunit1_end - .Lunit1_begin ## unit_length128.Lunit1_begin:129    .short 4 ## version130    .long .Lheader1_end - .Lheader1_begin ## header_length131.Lheader1_begin:132    .byte 2  ## minimum_instruction_length133    .byte 4  ## maximum_operations_per_instruction134    .byte 0  ## default_is_stmt135    .byte 42 ## line_base136    .byte 10 ## line_range137    .byte 2  ## opcode_base - lower than normal to show this can be handled.138    .byte 42 ## standard_opcode_lengths - different to normal.139    ## include_directories140    .asciz "baz"141    .byte 0142    ## file_names143    .asciz "foo.c"144    .byte 1    ## Directory index145    .byte 0x11 ## Timestamp146    .byte 0x22 ## Length147.Lheader1_end:148.Lunit1_end:149 150## Third line table program needed to show that only a single blank line is151## printed after a program with no sequences. The values in this table are152## arbitrary.153    .long .Lunit2_end - .Lunit2_begin ## unit_length154.Lunit2_begin:155    .short 4 ## version156    .long .Lheader2_end - .Lheader2_begin ## header_length157.Lheader2_begin:158    .byte 1 ## minimum_instruction_length159    .byte 2 ## maximum_operations_per_instruction160    .byte 1 ## default_is_stmt161    .byte 1 ## line_base162    .byte 1 ## line_range163    .byte 2 ## opcode_base164    .byte 1 ## standard_opcode_lengths165    ## include_directories166    .byte 0167    ## file_names168    .asciz "bar.c"169    .byte 0 ## Directory index170    .byte 0 ## Timestamp171    .byte 0 ## Length172.Lheader2_end:173    .byte 0, 0x1, 0x1 ## DW_LNE_end_sequence174.Lunit2_end:175