brintos

brintos / llvm-project-archived public Read only

0
0
Text · 9.2 KiB · 720b319 Raw
236 lines · plain
1## This test checks that lldb reads debug info from a dwp file when the dwo_id2## is in a DWARF5 CU header instead of a DW_AT_GNU_dwo_id attribute.3 4# RUN: llvm-mc --filetype=obj --triple x86_64 %s -o %t --defsym MAIN=15# RUN: llvm-mc --filetype=obj --triple x86_64 %s -o %t.dwp6# RUN: %lldb %t -o "target variable i" -b | FileCheck %s7# CHECK: (int) i = 428 9.ifdef MAIN10## Main file11	.text12	.globl	main                            # -- Begin function main13main:                                   # @main14.Lfunc_begin0:15	pushq	%rbp16	movq	%rsp, %rbp17	xorl	%eax, %eax18	popq	%rbp19	retq20.Lfunc_end0:21                                        # -- End function22	.data23i:24	.long	42                              # 0x2a25 26 27	.section	.debug_abbrev,"",@progbits28	.byte	1                               # Abbreviation Code29	.byte	74                              # DW_TAG_skeleton_unit30	.byte	0                               # DW_CHILDREN_no31	.byte	118                             # DW_AT_dwo_name32	.byte	8                               # DW_FORM_string33	.byte	17                              # DW_AT_low_pc34	.byte	27                              # DW_FORM_addrx35	.byte	18                              # DW_AT_high_pc36	.byte	6                               # DW_FORM_data437	.byte	115                             # DW_AT_addr_base38	.byte	23                              # DW_FORM_sec_offset39	.byte	0                               # EOM(1)40	.byte	0                               # EOM(2)41	.byte	0                               # EOM(3)42 43 44	.section	.debug_info,"",@progbits45.Lcu_begin0:46	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit47.Ldebug_info_start0:48	.short	5                             # DWARF version number49	.byte	4                               # DWARF Unit Type50	.byte	8                               # Address Size (in bytes)51	.long	.debug_abbrev                   # Offset Into Abbrev. Section52	.quad	1026699901672188186             # dwo_id53	.byte	1                               # Abbrev [1] 0x14:0x14 DW_TAG_skeleton_unit54	.asciz "hello.dwo"                    # DW_AT_dwo_name55	.byte	1                               # DW_AT_low_pc56	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc57	.long	.Laddr_table_base0              # DW_AT_addr_base58.Ldebug_info_end0:59 60	.section	.debug_addr,"",@progbits61	.long	.Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution62.Ldebug_addr_start0:63	.short	5                               # DWARF version number64	.byte	8                               # Address size65	.byte	0                               # Segment selector size66.Laddr_table_base0:67	.quad	i68	.quad	.Lfunc_begin069.Ldebug_addr_end0:70 71.else72## DWP file73	.section	.debug_str_offsets.dwo,"e",@progbits74	.long	2875	.short	576	.short	077 78 79	.section	.debug_str.dwo,"eMS",@progbits,180.Linfo_string0:81	.asciz	"i"82.Linfo_string1:83	.asciz	"int"84.Linfo_string2:85	.asciz	"main"86.Linfo_string3:87	.asciz	"hand-tuned clang output"88.Linfo_string4:89	.asciz	"hello.c"90.Linfo_string5:91	.asciz	"hello.dwo"92 93 94	.section	.debug_str_offsets.dwo,"e",@progbits95	.long	.Linfo_string0-.debug_str.dwo96	.long	.Linfo_string1-.debug_str.dwo97	.long	.Linfo_string2-.debug_str.dwo98	.long	.Linfo_string3-.debug_str.dwo99	.long	.Linfo_string4-.debug_str.dwo100	.long	.Linfo_string5-.debug_str.dwo101.Lstr_offsets_end:102 103 104	.section	.debug_info.dwo,"e",@progbits105	.long	.Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit106.Ldebug_info_dwo_start0:107	.short	5                               # DWARF version number108	.byte	5                               # DWARF Unit Type109	.byte	8                               # Address Size (in bytes)110	.long	0                               # Offset Into Abbrev. Section111	.quad	1026699901672188186             # dwo_id112	.byte	1                               # Abbrev [1] 0x14:0x25 DW_TAG_compile_unit113	.byte	3                               # DW_AT_producer114	.short	12                              # DW_AT_language115	.byte	4                               # DW_AT_name116	.byte	5                               # DW_AT_dwo_name117	.byte	2                               # Abbrev [2] 0x1a:0xb DW_TAG_variable118	.byte	0                               # DW_AT_name119	.long	37                              # DW_AT_type120                                        # DW_AT_external121	.byte	0                               # DW_AT_decl_file122	.byte	2                               # DW_AT_decl_line123	.byte	2                               # DW_AT_location124	.byte	161125	.byte	0126	.byte	3                               # Abbrev [3] 0x25:0x4 DW_TAG_base_type127	.byte	1                               # DW_AT_name128	.byte	5                               # DW_AT_encoding129	.byte	4                               # DW_AT_byte_size130	.byte	4                               # Abbrev [4] 0x29:0xf DW_TAG_subprogram131	.byte	1                               # DW_AT_low_pc132	.long	8       # DW_AT_high_pc133	.byte	1                               # DW_AT_frame_base134	.byte	86135	.byte	2                               # DW_AT_name136	.byte	0                               # DW_AT_decl_file137	.byte	3                               # DW_AT_decl_line138	.long	37                              # DW_AT_type139                                        # DW_AT_external140	.byte	0                               # End Of Children Mark141.Ldebug_info_dwo_end0:142 143 144	.section	.debug_abbrev.dwo,"e",@progbits145	.byte	1                               # Abbreviation Code146	.byte	17                              # DW_TAG_compile_unit147	.byte	1                               # DW_CHILDREN_yes148	.byte	37                              # DW_AT_producer149	.byte	37                              # DW_FORM_strx1150	.byte	19                              # DW_AT_language151	.byte	5                               # DW_FORM_data2152	.byte	3                               # DW_AT_name153	.byte	37                              # DW_FORM_strx1154	.byte	118                             # DW_AT_dwo_name155	.byte	37                              # DW_FORM_strx1156	.byte	0                               # EOM(1)157	.byte	0                               # EOM(2)158	.byte	2                               # Abbreviation Code159	.byte	52                              # DW_TAG_variable160	.byte	0                               # DW_CHILDREN_no161	.byte	3                               # DW_AT_name162	.byte	37                              # DW_FORM_strx1163	.byte	73                              # DW_AT_type164	.byte	19                              # DW_FORM_ref4165	.byte	63                              # DW_AT_external166	.byte	25                              # DW_FORM_flag_present167	.byte	58                              # DW_AT_decl_file168	.byte	11                              # DW_FORM_data1169	.byte	59                              # DW_AT_decl_line170	.byte	11                              # DW_FORM_data1171	.byte	2                               # DW_AT_location172	.byte	24                              # DW_FORM_exprloc173	.byte	0                               # EOM(1)174	.byte	0                               # EOM(2)175	.byte	3                               # Abbreviation Code176	.byte	36                              # DW_TAG_base_type177	.byte	0                               # DW_CHILDREN_no178	.byte	3                               # DW_AT_name179	.byte	37                              # DW_FORM_strx1180	.byte	62                              # DW_AT_encoding181	.byte	11                              # DW_FORM_data1182	.byte	11                              # DW_AT_byte_size183	.byte	11                              # DW_FORM_data1184	.byte	0                               # EOM(1)185	.byte	0                               # EOM(2)186	.byte	4                               # Abbreviation Code187	.byte	46                              # DW_TAG_subprogram188	.byte	0                               # DW_CHILDREN_no189	.byte	17                              # DW_AT_low_pc190	.byte	27                              # DW_FORM_addrx191	.byte	18                              # DW_AT_high_pc192	.byte	6                               # DW_FORM_data4193	.byte	64                              # DW_AT_frame_base194	.byte	24                              # DW_FORM_exprloc195	.byte	3                               # DW_AT_name196	.byte	37                              # DW_FORM_strx1197	.byte	58                              # DW_AT_decl_file198	.byte	11                              # DW_FORM_data1199	.byte	59                              # DW_AT_decl_line200	.byte	11                              # DW_FORM_data1201	.byte	73                              # DW_AT_type202	.byte	19                              # DW_FORM_ref4203	.byte	63                              # DW_AT_external204	.byte	25                              # DW_FORM_flag_present205	.byte	0                               # EOM(1)206	.byte	0                               # EOM(2)207	.byte	0                               # EOM(3)208.Ldebug_abbrev_end:209 210.section .debug_cu_index,"",@progbits211.short 5  # DWARF version number212.short 0  # Reserved213.long  3  # Section count214.long  1  # Unit count215.long  2 # Slot count216 217.quad  1026699901672188186, 0 # Hash table218.long  1, 0 # Index table219 220## Table header221.long 1   # DW_SECT_INFO222.long 3   # DW_SECT_ABBREV223.long 6   # DW_SECT_STR_OFFSETS224 225## Offsets226.long 0   # offset into .debug_info.dwo227.long 0   # offset into .debug_abbrev.dwo228.long 0   # offset into .debug_str_offsets.dwo229 230## Sizes231.long .Ldebug_info_dwo_end0 - .debug_info.dwo232.long .Ldebug_abbrev_end - .debug_abbrev.dwo233.long .Lstr_offsets_end - .debug_str_offsets.dwo234 235.endif236