brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.0 KiB · b9b4600 Raw
114 lines · plain
1# This tests the computation of the scope bytes covered by local variables. In2# particular, the case when the variable starts in the middle of the enclosing3# scope, and the compile unit has both DW_AT_ranges and DW_AT_low_pc attributes.4 5# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj -o %t6# RUN: llvm-dwarfdump --statistics %t | FileCheck %s7 8# CHECK: "sum_all_local_vars(#bytes in parent scope)": 12,9# CHECK: "sum_all_local_vars(#bytes in parent scope covered by DW_AT_location)": 8,10 11        .text12 13# Add padding to ensure the function does not start at address zero.14        .zero 25615 16f:                                      # @f17.Lf_begin:18        .zero 419.Lx_begin:20        .zero 821.Lf_end:22 23        .section        .debug_ranges,"",@progbits24.Ldebug_ranges:25        .quad   .Lf_begin26        .quad   .Lf_end27        .quad   028        .quad   029 30        .section        .debug_loc,"",@progbits31.Ldebug_loc:32        .quad   .Lx_begin33        .quad   .Lf_end34        .short  1                       # Loc expr size35        .byte   85                      # super-register DW_OP_reg536        .quad   037        .quad   038 39 40        .section        .debug_abbrev,"",@progbits41        .byte   1                       # Abbreviation Code42        .byte   17                      # DW_TAG_compile_unit43        .byte   1                       # DW_CHILDREN_yes44        .byte   37                      # DW_AT_producer45        .byte   8                       # DW_FORM_string46        .byte   17                      # DW_AT_low_pc47        .byte   1                       # DW_FORM_addr48        .byte   85                      # DW_AT_ranges49        .byte   23                      # DW_FORM_sec_offset50        .byte   0                       # EOM(1)51        .byte   0                       # EOM(2)52        .byte   2                       # Abbreviation Code53        .byte   46                      # DW_TAG_subprogram54        .byte   1                       # DW_CHILDREN_yes55        .byte   17                      # DW_AT_low_pc56        .byte   1                       # DW_FORM_addr57        .byte   18                      # DW_AT_high_pc58        .byte   6                       # DW_FORM_data459        .byte   3                       # DW_AT_name60        .byte   8                       # DW_FORM_string61        .byte   0                       # EOM(1)62        .byte   0                       # EOM(2)63        .byte   3                       # Abbreviation Code64        .byte   52                      # DW_TAG_variable65        .byte   0                       # DW_CHILDREN_no66        .byte   2                       # DW_AT_location67        .byte   23                      # DW_FORM_sec_offset68        .byte   3                       # DW_AT_name69        .byte   8                       # DW_FORM_string70        .byte   73                      # DW_AT_type71        .byte   19                      # DW_FORM_ref472        .byte   0                       # EOM(1)73        .byte   0                       # EOM(2)74        .byte   5                       # Abbreviation Code75        .byte   36                      # DW_TAG_base_type76        .byte   0                       # DW_CHILDREN_no77        .byte   3                       # DW_AT_name78        .byte   8                       # DW_FORM_string79        .byte   62                      # DW_AT_encoding80        .byte   11                      # DW_FORM_data181        .byte   11                      # DW_AT_byte_size82        .byte   11                      # DW_FORM_data183        .byte   0                       # EOM(1)84        .byte   0                       # EOM(2)85        .byte   0                       # EOM(3)86 87        .section        .debug_info,"",@progbits88.Lcu_begin:89        .long   .Ldebug_info_end-.Ldebug_info_start # Length of Unit90.Ldebug_info_start:91        .short  4                       # DWARF version number92        .long   .debug_abbrev           # Offset Into Abbrev. Section93        .byte   8                       # Address Size (in bytes)94        .byte   1                       # Abbrev [1] 0xb:0x64 DW_TAG_compile_unit95        .asciz  "Hand-written DWARF"    # DW_AT_producer96        .quad   0                       # DW_AT_low_pc97        .long   .Ldebug_ranges          # DW_AT_ranges98        .byte   2                       # Abbrev [2] 0x2a:0x28 DW_TAG_subprogram99        .quad   .Lf_begin               # DW_AT_low_pc100        .long   .Lf_end-.Lf_begin       # DW_AT_high_pc101        .asciz  "f"                     # DW_AT_name102        .byte   3                       # Abbrev [3] 0x43:0xe DW_TAG_variable103        .long   .Ldebug_loc             # DW_AT_location104        .asciz  "x"                     # DW_AT_name105        .long   .Lint                   # DW_AT_type106        .byte   0                       # End Of Children Mark107.Lint:108        .byte   5                       # Abbrev [5] 0x67:0x7 DW_TAG_base_type109        .asciz  "int"                   # DW_AT_name110        .byte   5                       # DW_AT_encoding111        .byte   4                       # DW_AT_byte_size112        .byte   0                       # End Of Children Mark113.Ldebug_info_end:114