brintos

brintos / llvm-project-archived public Read only

0
0
Text · 9.4 KiB · 9cb5342 Raw
170 lines · plain
1## Check that lldb can locate a static constant variable when its declaration is2## referenced by a debug_names index. This is a non-conforming extension used by3## dsymutil.4 5# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s > %t6# RUN: %lldb %t -o "target variable Class::constant" \7# RUN:   -o "expr -l c++ -- Class::constant" -o exit | FileCheck %s8 9# CHECK:      (lldb) target variable Class::constant10# CHECK-NEXT: (const int) Class::constant = 4711# CHECK:      (lldb) expr -l c++ -- Class::constant12# CHECK-NEXT: (const int) $0 = 4713 14        .section        .debug_abbrev,"",@progbits15        .byte   1                               # Abbreviation Code16        .byte   17                              # DW_TAG_compile_unit17        .byte   1                               # DW_CHILDREN_yes18        .byte   37                              # DW_AT_producer19        .byte   8                               # DW_FORM_string20        .byte   19                              # DW_AT_language21        .byte   5                               # DW_FORM_data222        .byte   0                               # EOM(1)23        .byte   0                               # EOM(2)24        .byte   3                               # Abbreviation Code25        .byte   2                               # DW_TAG_class_type26        .byte   1                               # DW_CHILDREN_yes27        .byte   54                              # DW_AT_calling_convention28        .byte   11                              # DW_FORM_data129        .byte   3                               # DW_AT_name30        .byte   14                              # DW_FORM_strp31        .byte   11                              # DW_AT_byte_size32        .byte   11                              # DW_FORM_data133        .byte   0                               # EOM(1)34        .byte   0                               # EOM(2)35        .byte   4                               # Abbreviation Code36        .byte   52                              # DW_TAG_variable37        .byte   0                               # DW_CHILDREN_no38        .byte   3                               # DW_AT_name39        .byte   14                              # DW_FORM_strp40        .byte   73                              # DW_AT_type41        .byte   19                              # DW_FORM_ref442        .byte   63                              # DW_AT_external43        .byte   25                              # DW_FORM_flag_present44        .byte   60                              # DW_AT_declaration45        .byte   25                              # DW_FORM_flag_present46        .byte   28                              # DW_AT_const_value47        .byte   13                              # DW_FORM_sdata48        .byte   0                               # EOM(1)49        .byte   0                               # EOM(2)50        .byte   5                               # Abbreviation Code51        .byte   38                              # DW_TAG_const_type52        .byte   0                               # DW_CHILDREN_no53        .byte   73                              # DW_AT_type54        .byte   19                              # DW_FORM_ref455        .byte   0                               # EOM(1)56        .byte   0                               # EOM(2)57        .byte   6                               # Abbreviation Code58        .byte   36                              # DW_TAG_base_type59        .byte   0                               # DW_CHILDREN_no60        .byte   3                               # DW_AT_name61        .byte   14                              # DW_FORM_strp62        .byte   62                              # DW_AT_encoding63        .byte   11                              # DW_FORM_data164        .byte   11                              # DW_AT_byte_size65        .byte   11                              # DW_FORM_data166        .byte   0                               # EOM(1)67        .byte   0                               # EOM(2)68        .byte   0                               # EOM(3)69        .section        .debug_info,"",@progbits70.Lcu_begin0:71        .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit72.Ldebug_info_start0:73        .short  5                               # DWARF version number74        .byte   1                               # DWARF Unit Type75        .byte   8                               # Address Size (in bytes)76        .long   .debug_abbrev                   # Offset Into Abbrev. Section77        .byte   1                               # Abbrev [1] 0xc:0x40 DW_TAG_compile_unit78        .asciz  "Hand-written DWARF"            # DW_AT_producer79        .short  33                              # DW_AT_language80.LClass:81        .byte   3                               # Abbrev [3] 0x29:0x10 DW_TAG_class_type82        .byte   5                               # DW_AT_calling_convention83        .long   .Linfo_string4                  # DW_AT_name84        .byte   1                               # DW_AT_byte_size85.Lvariable:86        .byte   4                               # Abbrev [4] 0x2f:0x9 DW_TAG_variable87        .long   .Linfo_string5                  # DW_AT_name88        .long   .Lconst_int-.Lcu_begin0         # DW_AT_type89                                                # DW_AT_external90                                                # DW_AT_declaration91        .byte   47                              # DW_AT_const_value92        .byte   0                               # End Of Children Mark93.Lconst_int:94        .byte   5                               # Abbrev [5] 0x39:0x5 DW_TAG_const_type95        .long   .Lint-.Lcu_begin0               # DW_AT_type96.Lint:97        .byte   6                               # Abbrev [6] 0x3e:0x4 DW_TAG_base_type98        .long   .Linfo_string6                  # DW_AT_name99        .byte   5                               # DW_AT_encoding100        .byte   4                               # DW_AT_byte_size101        .byte   0                               # End Of Children Mark102.Ldebug_info_end0:103 104        .section        .debug_str,"MS",@progbits,1105.Linfo_string4:106        .asciz  "Class"107.Linfo_string5:108        .asciz  "constant"109.Linfo_string6:110        .asciz  "int"111 112        .section        .debug_names,"",@progbits113        .long   .Lnames_end0-.Lnames_start0     # Header: unit length114.Lnames_start0:115        .short  5                               # Header: version116        .short  0                               # Header: padding117        .long   1                               # Header: compilation unit count118        .long   0                               # Header: local type unit count119        .long   0                               # Header: foreign type unit count120        .long   0                               # Header: bucket count121        .long   3                               # Header: name count122        .long   .Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size123        .long   8                               # Header: augmentation string size124        .ascii  "LLVM0700"                      # Header: augmentation string125        .long   .Lcu_begin0                     # Compilation unit 0126        .long   .Linfo_string4                  # String: Class127        .long   .Linfo_string5                  # String: constant128        .long   .Linfo_string6                  # String: int129        .long   .Lnames0-.Lnames_entries0130        .long   .Lnames3-.Lnames_entries0131        .long   .Lnames1-.Lnames_entries0132.Lnames_abbrev_start0:133        .byte   1                               # Abbrev code134        .byte   2                               # DW_TAG_class_type135        .byte   3                               # DW_IDX_die_offset136        .byte   19                              # DW_FORM_ref4137        .byte   0                               # End of abbrev138        .byte   0                               # End of abbrev139        .byte   2                               # Abbrev code140        .byte   52                              # DW_TAG_variable141        .byte   3                               # DW_IDX_die_offset142        .byte   19                              # DW_FORM_ref4143        .byte   0                               # End of abbrev144        .byte   0                               # End of abbrev145        .byte   3                               # Abbrev code146        .byte   36                              # DW_TAG_base_type147        .byte   3                               # DW_IDX_die_offset148        .byte   19                              # DW_FORM_ref4149        .byte   0                               # End of abbrev150        .byte   0                               # End of abbrev151        .byte   0                               # End of abbrev list152.Lnames_abbrev_end0:153.Lnames_entries0:154.Lnames0:155        .byte   1                               # Abbreviation code156        .long   .LClass-.Lcu_begin0             # DW_IDX_die_offset157        .byte   0                               # DW_IDX_parent158                                        # End of list: Class159.Lnames3:160        .byte   2                               # Abbreviation code161        .long   .Lvariable-.Lcu_begin0          # DW_IDX_die_offset162        .byte   0                               # DW_IDX_parent163                                        # End of list: constant164.Lnames1:165        .byte   3                               # Abbreviation code166        .long   .Lint-.Lcu_begin0               # DW_IDX_die_offset167        .byte   0                               # DW_IDX_parent168                                        # End of list: int169.Lnames_end0:170