Files
clang-p2996/lldb/test/API/functionalities/dwo/main.o.yaml
Greg Clayton 613336da8c Don't index the skeleton CU when we have a fission compile unit.
When fission is enabled, we were indexing the skeleton CU _and_ the .dwo CU. Issues arise when users enable compiler options that add extra data to the skeleton CU (like -fsplit-dwarf-inlining) and there can end up being types in the skeleton CU due to template parameters. We never want to index this information since the .dwo file has the real definition, and we really don't want function prototypes from this info since all parameters are removed. The index doesn't work correctly if it does index the skeleton CU as the DIE offset will assume it is from the .dwo file, so even if we do index the skeleton CU, the index entries will try and grab information from the .dwo file using the wrong DIE offset which can cause errors to be displayed or even worse, if the DIE offsets is valid in the .dwo CU, the wrong DIE will be used.

We also fix DWO ID detection to use llvm::Optional<uint64_t> to make sure we can load a .dwo file with a DWO ID of zero.

Differential Revision: https://reviews.llvm.org/D131437
2022-08-25 14:48:04 -07:00

213 lines
7.4 KiB
YAML

--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_X86_64
SectionHeaderStringTable: .strtab
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
AddressAlign: 0x10
Content: 554889E531C05DC30F1F840000000000554889E54883EC10C745FC00000000897DF8488975F0E8000000004883C4105DC3
- Name: .debug_abbrev
Type: SHT_PROGBITS
AddressAlign: 0x1
Content: 01110010171B0EB44219B0420EB1420711011206B34217000000
- Name: .debug_info
Type: SHT_PROGBITS
AddressAlign: 0x1
Content: 2C0000000400000000000801000000000000000000000000000000000000000000000000000000003100000000000000
- Name: .debug_addr
Type: SHT_PROGBITS
AddressAlign: 0x1
Content: '00000000000000000000000000000000'
- Name: .debug_gnu_pubnames
Type: SHT_PROGBITS
AddressAlign: 0x1
Content: 21000000020000000000300000001900000030666F6F0029000000306D61696E0000000000
- Name: .debug_gnu_pubtypes
Type: SHT_PROGBITS
AddressAlign: 0x1
Content: 21000000020000000000300000004F00000090696E74006200000090636861720000000000
- Name: .comment
Type: SHT_PROGBITS
Flags: [ SHF_MERGE, SHF_STRINGS ]
AddressAlign: 0x1
EntSize: 0x1
Content: 00636C616E672076657273696F6E2031362E302E30202868747470733A2F2F6769746875622E636F6D2F6C6C766D2F6C6C766D2D70726F6A65637420613836613537613033663831623362323561323839313737373235646662333733303164383836382900
- Name: .note.GNU-stack
Type: SHT_PROGBITS
AddressAlign: 0x1
- Name: .eh_frame
Type: SHT_X86_64_UNWIND
Flags: [ SHF_ALLOC ]
AddressAlign: 0x8
Content: 1400000000000000017A5200017810011B0C0708900100001C0000001C000000000000000800000000410E108602430D06430C07080000001C0000003C000000000000002100000000410E108602430D065C0C0708000000
- Name: .debug_line
Type: SHT_PROGBITS
AddressAlign: 0x1
Content: 47000000040020000000010101FB0E0D000101010100000001000001006D61696E2E637070000000000000090200000000000000000105030A4B0500BD050A0A0859050306580206000101
- Name: .rela.text
Type: SHT_RELA
Flags: [ SHF_INFO_LINK ]
Link: .symtab
AddressAlign: 0x8
Info: .text
Relocations:
- Offset: 0x27
Symbol: _Z3foov
Type: R_X86_64_PLT32
Addend: -4
- Name: .rela.debug_info
Type: SHT_RELA
Flags: [ SHF_INFO_LINK ]
Link: .symtab
AddressAlign: 0x8
Info: .debug_info
Relocations:
- Offset: 0x6
Symbol: .debug_abbrev
Type: R_X86_64_32
- Offset: 0xC
Symbol: .debug_line
Type: R_X86_64_32
- Offset: 0x10
Symbol: .debug_str
Type: R_X86_64_32
- Offset: 0x14
Symbol: .debug_str
Type: R_X86_64_32
Addend: 58
- Offset: 0x20
Symbol: .text
Type: R_X86_64_64
- Offset: 0x2C
Symbol: .debug_addr
Type: R_X86_64_32
- Name: .rela.debug_addr
Type: SHT_RELA
Flags: [ SHF_INFO_LINK ]
Link: .symtab
AddressAlign: 0x8
Info: .debug_addr
Relocations:
- Symbol: .text
Type: R_X86_64_64
- Offset: 0x8
Symbol: .text
Type: R_X86_64_64
Addend: 16
- Name: .rela.debug_gnu_pubnames
Type: SHT_RELA
Flags: [ SHF_INFO_LINK ]
Link: .symtab
AddressAlign: 0x8
Info: .debug_gnu_pubnames
Relocations:
- Offset: 0x6
Symbol: .debug_info
Type: R_X86_64_32
- Name: .rela.debug_gnu_pubtypes
Type: SHT_RELA
Flags: [ SHF_INFO_LINK ]
Link: .symtab
AddressAlign: 0x8
Info: .debug_gnu_pubtypes
Relocations:
- Offset: 0x6
Symbol: .debug_info
Type: R_X86_64_32
- Name: .rela.eh_frame
Type: SHT_RELA
Flags: [ SHF_INFO_LINK ]
Link: .symtab
AddressAlign: 0x8
Info: .eh_frame
Relocations:
- Offset: 0x20
Symbol: .text
Type: R_X86_64_PC32
- Offset: 0x40
Symbol: .text
Type: R_X86_64_PC32
Addend: 16
- Name: .rela.debug_line
Type: SHT_RELA
Flags: [ SHF_INFO_LINK ]
Link: .symtab
AddressAlign: 0x8
Info: .debug_line
Relocations:
- Offset: 0x2D
Symbol: .text
Type: R_X86_64_64
- Name: .llvm_addrsig
Type: SHT_LLVM_ADDRSIG
Flags: [ SHF_EXCLUDE ]
Link: .symtab
AddressAlign: 0x1
Symbols: [ _Z3foov ]
- Type: SectionHeaderTable
Sections:
- Name: .strtab
- Name: .text
- Name: .rela.text
- Name: .debug_abbrev
- Name: .debug_info
- Name: .rela.debug_info
- Name: .debug_str
- Name: .debug_addr
- Name: .rela.debug_addr
- Name: .debug_gnu_pubnames
- Name: .rela.debug_gnu_pubnames
- Name: .debug_gnu_pubtypes
- Name: .rela.debug_gnu_pubtypes
- Name: .comment
- Name: .note.GNU-stack
- Name: .eh_frame
- Name: .rela.eh_frame
- Name: .debug_line
- Name: .rela.debug_line
- Name: .llvm_addrsig
- Name: .symtab
Symbols:
- Name: main.cpp
Type: STT_FILE
Index: SHN_ABS
- Name: .text
Type: STT_SECTION
Section: .text
- Name: .debug_abbrev
Type: STT_SECTION
Section: .debug_abbrev
- Name: .debug_info
Type: STT_SECTION
Section: .debug_info
- Name: .debug_str
Type: STT_SECTION
Section: .debug_str
- Name: .debug_addr
Type: STT_SECTION
Section: .debug_addr
- Name: .debug_line
Type: STT_SECTION
Section: .debug_line
- Name: _Z3foov
Type: STT_FUNC
Section: .text
Binding: STB_GLOBAL
Size: 0x8
- Name: main
Type: STT_FUNC
Section: .text
Binding: STB_GLOBAL
Value: 0x10
Size: 0x21
DWARF:
debug_str:
- '/Users/gclayton/Documents/objfiles/fission/split-inlining'
- main.dwo
...