|
1 | | -RUN: rm -rf %t && mkdir -p %t && cd %t |
2 | | -RUN: llvm-mc --triple=x86_64-unknown-linux --filetype=obj --split-dwarf-file=%t/main_v5.dwo -dwarf-version=5 %p/../Inputs/overflow/main_v5.s -o %t/main_v5.o |
3 | | -RUN: llvm-mc --triple=x86_64-unknown-linux --filetype=obj --split-dwarf-file=%t/debug_info_v4.dwo -dwarf-version=4 %p/../Inputs/overflow/debug_info_v4.s -o %t/debug_info_v4.o |
4 | | -RUN: not llvm-dwp %t/main_v5.dwo %t/debug_info_v4.dwo -o main.dwp 2>&1 | FileCheck %s |
| 1 | +RUN: rm -rf %t && split-file %s %t && cd %t |
| 2 | +RUN: llvm-mc --triple=x86_64-unknown-linux --filetype=obj --split-dwarf-file=%t/v5.dwo -dwarf-version=5 %t/v5.s -o %t/v5.o |
| 3 | +RUN: llvm-mc --triple=x86_64-unknown-linux --filetype=obj --split-dwarf-file=%t/v4.dwo -dwarf-version=4 %t/v4.s -o %t/v4.o |
| 4 | +RUN: not llvm-dwp %t/v5.dwo %t/v4.dwo -o main.dwp 2>&1 | FileCheck %s |
5 | 5 |
|
6 | | -CHECK: error: incompatible DWARF compile unit version: {{.*}}debug_info_v4.dwo (version 4) and {{.*}}main_v5.dwo (version 5) |
| 6 | +CHECK: error: incompatible DWARF compile unit version: {{.*}}v4.dwo (version 4) and {{.*}}v5.dwo (version 5) |
| 7 | + |
| 8 | +#--- v5.s |
| 9 | + .section .debug_info.dwo,"e",@progbits |
| 10 | + .long .Ldebug_info_dwo_end2-.Ldebug_info_dwo_start2 # Length of Unit |
| 11 | +.Ldebug_info_dwo_start2: |
| 12 | + .short 5 # DWARF version number |
| 13 | + .byte 5 # DWARF Unit Type (DW_UT_split_compile) |
| 14 | + .byte 8 # Address Size (in bytes) |
| 15 | + .long 0 # Offset Into Abbrev. Section |
| 16 | + .quad 1152943841751211454 |
| 17 | + .byte 1 # Abbrev [1] DW_TAG_compile_unit |
| 18 | +.Ldebug_info_dwo_end2: |
| 19 | + .section .debug_abbrev.dwo,"e",@progbits |
| 20 | + .byte 1 # Abbreviation Code |
| 21 | + .byte 17 # DW_TAG_compile_unit |
| 22 | + .byte 0 # DW_CHILDREN_no |
| 23 | + .byte 0 # EOM(1) |
| 24 | + .byte 0 # EOM(2) |
| 25 | + .byte 2 # Abbreviation Code |
| 26 | + .byte 65 # DW_TAG_type_unit |
| 27 | + .byte 1 # DW_CHILDREN_yes |
| 28 | + .byte 0 # EOM |
| 29 | + .byte 0 # EOM |
| 30 | + .byte 4 # Abbreviation Code |
| 31 | + .byte 65 # DW_TAG_type_unit |
| 32 | + .byte 1 # DW_CHILDREN_yes |
| 33 | + .byte 0 # EOM |
| 34 | + .byte 0 # EOM |
| 35 | + .byte 0 # EOM |
| 36 | + |
| 37 | +#--- v4.s |
| 38 | + .section .debug_info.dwo,"e",@progbits |
| 39 | + .long .Ldebug_info_dwo_end2-.Ldebug_info_dwo_start2 # Length of Unit |
| 40 | +.Ldebug_info_dwo_start2: |
| 41 | + .short 4 # DWARF version number |
| 42 | + .long 0 # Offset Into Abbrev. Section |
| 43 | + .byte 8 # Address Size (in bytes) |
| 44 | + .byte 1 # Abbrev [1] DW_TAG_compile_unit |
| 45 | + .quad -6619898858003450627 # DW_AT_GNU_dwo_id |
| 46 | +.Ldebug_info_dwo_end2: |
0 commit comments