174 lines · plain
1# RUN: llvm-mc --triple=x86_64-pc-linux --filetype=obj %s -o %t2# RUN: %lldb -o "target variable ug U::s" -b %t | FileCheck %s3 4# CHECK: (lldb) target variable ug5# CHECK: (U) ug = (m = 14159265)6# CHECK: (int) U::s = 652951417 8# This tests that a static member in a class declared in the anonymous namespace9# does not appear as a field of the class. There is a difference between the10# debug info generated by gcc and clang, where clang flags the static member11# with DW_AT_external, but gcc does not.12#13# Roughly corresponds to this source code:14#15# namespace {16# struct U {17# static int s;18# int m = 14159265;19# };20# int U::s = 65295141;21# }22#23# U ug;24 25 .file "test.cpp"26 .data27 .quad 028ug:29 .long 1415926530.Lug_s:31 .long 6529514132 33 .section .debug_info,"",@progbits34.Ldebug_info0:35 .long .Lcu_end-.Lcu_begin36.Lcu_begin:37 .value 0x438 .long .Ldebug_abbrev039 .byte 0x840 .uleb128 0x141 .asciz "GCC DWARF reduced by hand"42 .byte 0x443 .asciz "test.cpp"44 .uleb128 0x245.LU:46 .uleb128 0x347 .string "U"48 .byte 0x449.LU_s:50 .uleb128 0x451 .string "s"52 .long .Lint-.Ldebug_info053 .uleb128 0x554 .string "m"55 .long .Lint-.Ldebug_info056 .byte 057 .byte 058 .byte 059 .uleb128 0x660 .long 0x2d61.Lint:62 .uleb128 0x763 .byte 0x464 .byte 0x565 .string "int"66 .uleb128 0x967 .string "ug"68 .long .LU-.Ldebug_info069 .uleb128 0x970 .byte 0x371 .quad ug72 .uleb128 0xa73 .long .LU_s-.Ldebug_info074 .uleb128 0x975 .byte 0x376 .quad .Lug_s77 .byte 078.Lcu_end:79 .section .debug_abbrev,"",@progbits80.Ldebug_abbrev0:81 .uleb128 0x182 .uleb128 0x1183 .byte 0x184 .uleb128 0x2585 .uleb128 0x886 .uleb128 0x1387 .uleb128 0xb88 .uleb128 0x389 .uleb128 0x890 .byte 091 .byte 092 .uleb128 0x293 .uleb128 0x3994 .byte 0x195 .byte 096 .byte 097 .uleb128 0x398 .uleb128 0x1399 .byte 0x1100 .uleb128 0x3101 .uleb128 0x8102 .uleb128 0xb103 .uleb128 0xb104 .byte 0105 .byte 0106 .uleb128 0x4107 .uleb128 0xd108 .byte 0109 .uleb128 0x3110 .uleb128 0x8111 .uleb128 0x49112 .uleb128 0x13113 .uleb128 0x3c114 .uleb128 0x19115 .byte 0116 .byte 0117 .uleb128 0x5118 .uleb128 0xd119 .byte 0120 .uleb128 0x3121 .uleb128 0x8122 .uleb128 0x49123 .uleb128 0x13124 .uleb128 0x38125 .uleb128 0xb126 .byte 0127 .byte 0128 .uleb128 0x6129 .uleb128 0x3a130 .byte 0131 .uleb128 0x18132 .uleb128 0x13133 .byte 0134 .byte 0135 .uleb128 0x7136 .uleb128 0x24137 .byte 0138 .uleb128 0xb139 .uleb128 0xb140 .uleb128 0x3e141 .uleb128 0xb142 .uleb128 0x3143 .uleb128 0x8144 .byte 0145 .byte 0146 .uleb128 0x8147 .uleb128 0x26148 .byte 0149 .uleb128 0x49150 .uleb128 0x13151 .byte 0152 .byte 0153 .uleb128 0x9154 .uleb128 0x34155 .byte 0156 .uleb128 0x3157 .uleb128 0x8158 .uleb128 0x49159 .uleb128 0x13160 .uleb128 0x2161 .uleb128 0x18162 .byte 0163 .byte 0164 .uleb128 0xa165 .uleb128 0x34166 .byte 0167 .uleb128 0x47168 .uleb128 0x13169 .uleb128 0x2170 .uleb128 0x18171 .byte 0172 .byte 0173 .byte 0174