|
1 | 1 | // RUN: llvm-mc -filetype=obj -compress-debug-sections -triple x86_64-pc-linux-gnu < %s -o %t
|
2 | 2 | // RUN: llvm-objdump -s %t | FileCheck %s
|
3 |
| -// RUN: llvm-dwarfdump -debug-dump=abbrev %t | FileCheck --check-prefix=ABBREV %s |
| 3 | +// RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck --check-prefix=INFO %s |
4 | 4 | // RUN: llvm-mc -filetype=obj -compress-debug-sections -triple i386-pc-linux-gnu < %s \
|
5 | 5 | // RUN: | llvm-readobj -symbols - | FileCheck --check-prefix=386-SYMBOLS %s
|
6 | 6 |
|
|
12 | 12 | // CHECK-NOT: ZLIB
|
13 | 13 | // CHECK: Contents of
|
14 | 14 |
|
15 |
| -// CHECK: Contents of section .zdebug_abbrev: |
16 |
| -// CHECK-NEXT: ZLIB |
| 15 | +// Don't compress small sections, such as this simple debug_abbrev example |
| 16 | +// CHECK: Contents of section .debug_abbrev: |
| 17 | +// CHECK-NOT: ZLIB |
| 18 | +// CHECK-NOT: Contents of |
| 19 | + |
| 20 | +// CHECK: Contents of section .debug_info: |
17 | 21 |
|
18 | 22 | // FIXME: Handle compressing alignment fragments to support compressing debug_frame
|
19 | 23 | // CHECK: Contents of section .debug_frame:
|
20 | 24 | // CHECK-NOT: ZLIB
|
21 | 25 | // CHECK: Contents of
|
22 | 26 |
|
23 | 27 | // Decompress one valid dwarf section just to check that this roundtrips
|
24 |
| -// ABBREV: Abbrev table for offset: 0x00000000 |
25 |
| -// ABBREV: [1] DW_TAG_compile_unit DW_CHILDREN_no |
| 28 | +// INFO: 0x00000000: Compile Unit: length = 0x0000000c version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x00000010) |
26 | 29 |
|
27 | 30 | // In x86 32 bit named symbols are used for temporary symbols in merge
|
28 | 31 | // sections, so make sure we handle symbols inside compressed sections
|
|
41 | 44 | .byte 14 # DW_FORM_strp
|
42 | 45 | .byte 0 # EOM(1)
|
43 | 46 | .byte 0 # EOM(2)
|
| 47 | + |
| 48 | + .section .debug_info,"",@progbits |
| 49 | + .long 12 # Length of Unit |
| 50 | + .short 4 # DWARF version number |
| 51 | + .long .Lsection_abbrev # Offset Into Abbrev. Section |
| 52 | + .byte 8 # Address Size (in bytes) |
| 53 | + .byte 1 # Abbrev [1] DW_TAG_compile_unit |
| 54 | + .long .Linfo_string0 # DW_AT_comp_dir |
| 55 | + |
44 | 56 | .text
|
45 | 57 | foo:
|
46 | 58 | .cfi_startproc
|
47 | 59 | .file 1 "Driver.ii"
|
| 60 | +# pad out the line table to make sure it's big enough to warrant compression |
48 | 61 | .loc 1 2 0
|
49 | 62 | nop
|
| 63 | + .loc 1 3 0 |
| 64 | + nop |
| 65 | + .loc 1 4 0 |
| 66 | + nop |
| 67 | + .loc 1 5 0 |
| 68 | + nop |
| 69 | + .loc 1 6 0 |
| 70 | + nop |
| 71 | + .loc 1 7 0 |
| 72 | + nop |
| 73 | + .loc 1 8 0 |
| 74 | + nop |
50 | 75 | .cfi_endproc
|
51 | 76 | .cfi_sections .debug_frame
|
52 | 77 |
|
53 | 78 | .section .debug_str,"MS",@progbits,1
|
54 | 79 | .Linfo_string0:
|
55 |
| - .asciz "foo" |
56 |
| - |
57 |
| - .section .debug_info,"",@progbits |
58 |
| - .long 40 # Length of Unit |
59 |
| - .short 4 # DWARF version number |
60 |
| - .long .Lsection_abbrev # Offset Into Abbrev. Section |
61 |
| - .byte 4 # Address Size (in bytes) |
62 |
| - .byte 1 # Abbrev [1] DW_TAG_compile_unit |
63 |
| - .long .Linfo_string0 # DW_AT_comp_dir |
| 80 | + .asciz "compress this " |
0 commit comments