xref: /llvm-project/lldb/test/Shell/SymbolFile/DWARF/x86/parallel-indexing-stress.s (revision 8a64d80a959bf2844df33f9112e456f33de7b468)
1# Stress-test the parallel indexing of compile units.
2
3# RUN: llvm-mc -triple x86_64-pc-linux %s -o %t -filetype=obj
4# RUN: %lldb %t -o "target variable A" -b | FileCheck %s
5
6# CHECK-COUNT-256: A = 47
7
8	.section	.debug_str,"MS",@progbits,1
9.Linfo_string0:
10	.asciz	"Hand-written DWARF"
11.Lname:
12	.asciz	"A"
13.Linfo_string4:
14	.asciz	"int"                   # string offset=95
15
16	.section	.debug_abbrev,"",@progbits
17	.byte	1                       # Abbreviation Code
18	.byte	17                      # DW_TAG_compile_unit
19	.byte	1                       # DW_CHILDREN_yes
20	.byte	37                      # DW_AT_producer
21	.byte	14                      # DW_FORM_strp
22	.byte	0                       # EOM(1)
23	.byte	0                       # EOM(2)
24	.byte	2                       # Abbreviation Code
25	.byte	52                      # DW_TAG_variable
26	.byte	0                       # DW_CHILDREN_no
27	.byte	3                       # DW_AT_name
28	.byte	14                      # DW_FORM_strp
29	.byte	73                      # DW_AT_type
30	.byte	19                      # DW_FORM_ref4
31	.byte	2                       # DW_AT_location
32	.byte	24                      # DW_FORM_exprloc
33	.byte	0                       # EOM(1)
34	.byte	0                       # EOM(2)
35	.byte	3                       # Abbreviation Code
36	.byte	36                      # DW_TAG_base_type
37	.byte	0                       # DW_CHILDREN_no
38	.byte	3                       # DW_AT_name
39	.byte	14                      # DW_FORM_strp
40	.byte	62                      # DW_AT_encoding
41	.byte	11                      # DW_FORM_data1
42	.byte	11                      # DW_AT_byte_size
43	.byte	11                      # DW_FORM_data1
44	.byte	0                       # EOM(1)
45	.byte	0                       # EOM(2)
46	.byte	0                       # EOM(3)
47
48.macro generate_unit
49	.data
50A\@:
51	.long	47
52
53	.section	.debug_str,"MS",@progbits,1
54
55	.section	.debug_info,"",@progbits
56.Lcu_begin\@:
57	.long	.Ldebug_info_end\@-.Ldebug_info_start\@ # Length of Unit
58.Ldebug_info_start\@:
59	.short	4                       # DWARF version number
60	.long	.debug_abbrev           # Offset Into Abbrev. Section
61	.byte	8                       # Address Size (in bytes)
62	.byte	1                       # Abbrev [1] 0xb:0x30 DW_TAG_compile_unit
63	.long	.Linfo_string0          # DW_AT_producer
64	.byte	2                       # Abbrev [2] 0x1e:0x15 DW_TAG_variable
65	.long	.Lname                  # DW_AT_name
66	.long	.Ltype\@-.Lcu_begin\@   # DW_AT_type
67	.byte	9                       # DW_AT_location
68	.byte	3
69	.quad	A\@
70.Ltype\@:
71	.byte	3                       # Abbrev [3] 0x33:0x7 DW_TAG_base_type
72	.long	.Linfo_string4          # DW_AT_name
73	.byte	5                       # DW_AT_encoding
74	.byte	4                       # DW_AT_byte_size
75	.byte	0                       # End Of Children Mark
76.Ldebug_info_end\@:
77
78.endm
79
80.rept 256
81generate_unit
82.endr
83