brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 06cb2dc Raw
50 lines · plain
1// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -S --sd - | FileCheck %s2 3// Test that .debug_line is populated.  TODO: This test should really be using4// llvm-dwarfdump, but it cannot parse this particular object file.  The content5// of .debug_line was checked using GNU binutils:6 7// $ objdump --dwarf=decodedline debug-line.o8// [...]9// File name                            Line number    Starting address10// foo.c                                          4                   011// foo.c                                          5                 0x412// foo.c                                          6                 0x513 14// CHECK:        Section {15// CHECK:          Name: .debug_line16// CHECK-NEXT:     Type: SHT_PROGBITS17// CHECK-NEXT:     Flags [18// CHECK-NEXT:     ]19// CHECK-NEXT:     Address: 0x020// CHECK-NEXT:     Offset:21// CHECK-NEXT:     Size: 5822// CHECK-NEXT:     Link: 023// CHECK-NEXT:     Info: 024// CHECK-NEXT:     AddressAlignment: 125// CHECK-NEXT:     EntrySize: 026// CHECK-NEXT:     SectionData (27 28// CHECK-NEXT:       0000: 36000000 04001D00 00000101 01FB0E0D29// CHECK-NEXT:       0010: 00010101 01000000 01000001 00666F6F  30// CHECK-NEXT:       0020: 2E630000 00000000 09020000 00000000  31// CHECK-NEXT:       0030: 0000154B 21020800 0101              32// CHECK-NEXT:     )33// CHECK-NEXT:   }34 35	.section	.debug_line,"",@progbits36	.text37 38	.file 1 "foo.c"39	.loc 1 4 040	subq	$8, %rsp41 42// Test that .loc works with values, not just instructions.43 44	.loc 1 5 045	.byte 0xc346 47	.loc 1 6 048l:49	.quad l50