This patch fixes .debug_names verification for split DWARF with no type units. It will print out an error for any name entries where we can't locate the .dwo file. It finds the non skeleton unit and correctly figures out the DIE offset in the .dwo file. If the non skeleton unit is found and yet the skeleton unit has a DWO ID, an error will be emitted showing we couldn't access the non-skeleton compile unit.
33 lines
1.4 KiB
Plaintext
33 lines
1.4 KiB
Plaintext
# Verify we can successfully verify .debug_names with split DWARF.
|
|
#
|
|
# RUN: rm -rf %t1/
|
|
# RUN: mkdir %t1
|
|
# RUN: yaml2obj %p/Inputs/verify_split_dwarf_debug_names_exe.yaml > %t1/a.out
|
|
# RUN: yaml2obj %p/Inputs/verify_split_dwarf_debug_names_main_dwo.yaml > %t1/main.dwo
|
|
# RUN: cd %t1
|
|
# RUN: llvm-dwarfdump --verify %t1/a.out | FileCheck %s
|
|
|
|
# CHECK: Verifying unit: 1 / 1
|
|
# CHECK: Verifying dwo Units...
|
|
# CHECK: Verifying .debug_line...
|
|
# CHECK: Verifying .debug_str_offsets...
|
|
# CHECK: Verifying .debug_names...
|
|
# CHECK: No errors.
|
|
|
|
# Now verify if we remove the "main.dwo" file that we get an error letting us
|
|
# know that the .dwo file was not able to be found.
|
|
# RUN: rm %t1/main.dwo
|
|
# RUN: not llvm-dwarfdump --verify %t1/a.out | FileCheck --check-prefix=NODWO %s
|
|
|
|
# NODWO: Verifying unit: 1 / 1
|
|
# NODWO: Verifying dwo Units...
|
|
# NODWO: Verifying .debug_line...
|
|
# NODWO: Verifying .debug_str_offsets...
|
|
# NODWO: Verifying .debug_names...
|
|
# NODWO: error: Name Index @ 0x0: Entry @ 0x79 unable to load .dwo file "main.dwo" for DWARF unit @ 0x0.
|
|
# NODWO: error: Name Index @ 0x0: Entry @ 0x7f unable to load .dwo file "main.dwo" for DWARF unit @ 0x0.
|
|
# NODWO: error: Name Index @ 0x0: Entry @ 0x85 unable to load .dwo file "main.dwo" for DWARF unit @ 0x0.
|
|
# NODWO: error: Aggregated error counts:
|
|
# NODWO: error: Unable to get load .dwo file occurred 3 time(s).
|
|
# NODWO: Errors detected.
|