133 lines · plain
1## Test that lldb respects the layout defined in DWARF even when starting out2## with a declaration of the class.3 4# RUN: split-file %s %t5# RUN: llvm-mc --triple x86_64-pc-linux %t/asm --filetype=obj -o %t.o6# RUN: %lldb -s %t/commands -o exit %t.o 2>&1 | FileCheck %s7 8#--- commands9target var a -fx10# CHECK-LABEL: target var a11# CHECK: (A) a = (i = 0xbaadf00d)12 13#--- asm14 .data15 .p2align 416 .long 017a:18 .long 0xdeadbeef19 .long 0xbaadf00d20 21 .section .debug_abbrev,"",@progbits22 .byte 1 # Abbreviation Code23 .byte 17 # DW_TAG_compile_unit24 .byte 1 # DW_CHILDREN_yes25 .byte 37 # DW_AT_producer26 .byte 8 # DW_FORM_string27 .byte 0 # EOM(1)28 .byte 0 # EOM(2)29 .byte 2 # Abbreviation Code30 .byte 52 # DW_TAG_variable31 .byte 0 # DW_CHILDREN_no32 .byte 3 # DW_AT_name33 .byte 8 # DW_FORM_string34 .byte 73 # DW_AT_type35 .byte 19 # DW_FORM_ref436 .byte 2 # DW_AT_location37 .byte 24 # DW_FORM_exprloc38 .byte 0 # EOM(1)39 .byte 0 # EOM(2)40 .byte 3 # Abbreviation Code41 .byte 19 # DW_TAG_structure_type42 .byte 0 # DW_CHILDREN_no43 .byte 3 # DW_AT_name44 .byte 8 # DW_FORM_string45 .byte 60 # DW_AT_declaration46 .byte 25 # DW_FORM_flag_present47 .byte 0 # EOM(1)48 .byte 0 # EOM(2)49 .byte 4 # Abbreviation Code50 .byte 19 # DW_TAG_structure_type51 .byte 1 # DW_CHILDREN_yes52 .byte 3 # DW_AT_name53 .byte 8 # DW_FORM_string54 .byte 11 # DW_AT_byte_size55 .byte 11 # DW_FORM_data156 .byte 0 # EOM(1)57 .byte 0 # EOM(2)58 .byte 5 # Abbreviation Code59 .byte 13 # DW_TAG_member60 .byte 0 # DW_CHILDREN_no61 .byte 3 # DW_AT_name62 .byte 8 # DW_FORM_string63 .byte 73 # DW_AT_type64 .byte 19 # DW_FORM_ref465 .byte 56 # DW_AT_data_member_location66 .byte 11 # DW_FORM_data167 .byte 0 # EOM(1)68 .byte 0 # EOM(2)69 .byte 6 # Abbreviation Code70 .byte 36 # DW_TAG_base_type71 .byte 0 # DW_CHILDREN_no72 .byte 3 # DW_AT_name73 .byte 8 # DW_FORM_string74 .byte 62 # DW_AT_encoding75 .byte 11 # DW_FORM_data176 .byte 11 # DW_AT_byte_size77 .byte 11 # DW_FORM_data178 .byte 0 # EOM(1)79 .byte 0 # EOM(2)80 .byte 0 # EOM(3)81 82 .section .debug_info,"",@progbits83.Lcu_begin0:84 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit85.Ldebug_info_start0:86 .short 4 # DWARF version number87 .long .debug_abbrev # Offset Into Abbrev. Section88 .byte 8 # Address Size (in bytes)89 .byte 1 # Abbrev [1] DW_TAG_compile_unit90 .asciz "Hand-written DWARF" # DW_AT_producer91 92 .byte 2 # Abbrev [2] DW_TAG_variable93 .asciz "a" # DW_AT_name94 .long .LA_decl-.Lcu_begin0 # DW_AT_type95 .byte 9 # DW_AT_location96 .byte 397 .quad a98.LA_decl:99 .byte 3 # Abbrev [3] DW_TAG_structure_type100 .asciz "A" # DW_AT_name101 # DW_AT_declaration102 .byte 0 # End Of Children Mark103.Ldebug_info_end0:104 105.Lcu_begin1:106 .long .Ldebug_info_end1-.Ldebug_info_start1 # Length of Unit107.Ldebug_info_start1:108 .short 4 # DWARF version number109 .long .debug_abbrev # Offset Into Abbrev. Section110 .byte 8 # Address Size (in bytes)111 .byte 1 # Abbrev [1] DW_TAG_compile_unit112 .asciz "Hand-written DWARF" # DW_AT_producer113 114 .byte 4 # Abbrev [4] DW_TAG_structure_type115 .asciz "A" # DW_AT_name116 # DW_AT_declaration117 .byte 8 # DW_AT_byte_size118 .byte 5 # Abbrev [5] DW_TAG_member119 .asciz "i" # DW_AT_name120 .long .Lint-.Lcu_begin1 # DW_AT_type121## NB: empty padding before this member122 .byte 4 # DW_AT_data_member_location123 .byte 0 # End Of Children Mark124 125.Lint:126 .byte 6 # Abbrev [6] DW_TAG_base_type127 .asciz "int" # DW_AT_name128 .byte 5 # DW_AT_encoding129 .byte 4 # DW_AT_byte_size130 131 .byte 0 # End Of Children Mark132.Ldebug_info_end1:133