llvm-project/llvm/test/tools/llvm-objdump
Ali Tamur 783d84bb39 [llvm] Prevent duplicate files in debug line header in dwarf 5: another attempt
Another attempt to land the changes in debug line header to prevent duplicate
files in Dwarf 5. I rolled back my previous commit because of a mistake in
generating the object file in a test. Meanwhile, I addressed some offline
comments and changed the implementation; the largest difference is that
MCDwarfLineTableHeader does not keep DwarfVersion but gets it as a parameter. I
also merged the patch to fix two lld tests that will strt to fail into this
patch.

Original Commit:

https://reviews.llvm.org/D59515

Original Message:
Motivation: In previous dwarf versions, file name indexes started from 1, and
the primary source file was not explicit. Dwarf 5 standard (6.2.4) prescribes
the primary source file to be explicitly given an entry with an index number 0.

The current implementation honors the specification by just duplicating the
main source file, once with index number 0, and later maybe with another
index number. While this is compliant with the letter of the standard, the
duplication causes problems for consumers of this information such as lldb.
(Some files are duplicated, where only some of them have a line table although
all refer to the same file)

With this change, dwarf 5 debug line section files always start from 0, and
the zeroth entry is not duplicated whenever possible. This requires different
handling of dwarf 4 and dwarf 5 during generation (e.g. when a function returns
an index zero for a file name, it signals an error in dwarf 4, but not in dwarf
5) However, I think the minor complication is worth it, because it enables all
consumers (lldb, gdb, dwarfdump, objdump, and so on) to treat all files in the
file name list homogenously.

llvm-svn: 358732
2019-04-19 02:26:56 +00:00
..
AArch64 [BinaryFormat] Update Mach-O ARM64E CPU subtype and dumping 2019-04-08 21:37:08 +00:00
AMDGPU AMDGPU: Remove remnants of old address space mapping 2018-08-31 05:49:54 +00:00
ARM [llvm-objdump] Support arg grouping for -j and -M (e.g. llvm-objdump -sj.foo -dMreg-names-raw) 2019-03-21 18:45:44 +00:00
Hexagon Remove irrelevant references to legacy git repositories from 2019-01-15 16:18:52 +00:00
Inputs [llvm] Prevent duplicate files in debug line header in dwarf 5: another attempt 2019-04-19 02:26:56 +00:00
Mips
PowerPC [PowerPC] Fix printing of negative offsets in call instruction dissasembly. 2019-02-12 17:48:22 +00:00
WebAssembly [WebAssembly] Remove uses of ThreadModel 2019-02-28 18:39:08 +00:00
X86 [llvm] Prevent duplicate files in debug line header in dwarf 5: another attempt 2019-04-19 02:26:56 +00:00
all-headers.test [llvm-objdump] - Dump the archive headers when -all-headers is specified. 2019-01-18 12:01:59 +00:00
archive-headers.test
call-absolute-symbol-elf.test
coff-file.test
coff-import-library.test
coff-large-bss.test
coff-many-relocs.test
coff-non-null-terminated-file.test
coff-private-headers.test
common-symbol-elf.test [llvm-objdump] Add symbol 'O' for object data 2018-11-11 17:47:13 +00:00
eh_frame-arm64.test
eh_frame-coff.test [DebugInfo] Fix the type of the formated variable 2019-03-07 16:31:08 +00:00
eh_frame-mipsel.test
eh_frame_zero_cie.test
elf-dynamic-section-machine-specific.test [ELF] Fix GCC8 warnings about "fall through", NFCI 2019-03-13 10:38:17 +00:00
elf-dynamic-section.test [llvm-objdump] Should print unknown d_tag in hex format 2019-03-02 04:20:28 +00:00
embedded-source.test Add reproduction instructions to llvm-objdump's embedded source test. 2019-03-28 01:56:16 +00:00
file-headers-coff.test [llvm-objdump] Fix --file-headers (-f) option 2018-10-19 22:16:49 +00:00
file-headers-elf.test [llvm-objdump] Fix --file-headers (-f) option 2018-10-19 22:16:49 +00:00
file-headers-pe.test [llvm-objdump] Fix --file-headers (-f) option 2018-10-19 22:16:49 +00:00
file-headers-unsupported.test
full-contents.test [commit test] Add blank line to test/tools/llvm-objdump/full-contents.test 2018-11-13 02:14:38 +00:00
hex-relocation-addr.test
invalid-input.test [llvm-objdump][MachO] Disable some invalid input tests 2019-01-10 23:46:31 +00:00
macho-LLVM-bundle.test
macho-bad-bind.test Fix Mach-O bind and rebase validation errors in libObject 2019-03-20 23:21:16 +00:00
macho-bad-dysymtab.test [MachO] Fix inconsistency between error messages when validating LC_DYSYMTAB 2018-09-04 16:31:53 +00:00
macho-bad-ordinal.test
macho-bad-trie.test
macho-bind.test
macho-bind2.test
macho-compact-unwind-i386.test
macho-compact-unwind-x86_64.test
macho-exports-trie.test
macho-lazy-bind.test
macho-objc-meta-data.test
macho-rebase.test
macho-sections.test
macho-unwind-info-arm64.test
macho-unwind-info-no-relocs.test
macho-unwind-info-x86_64.test
macho-weak-bind.test
malformed-archives.test
malformed-macho.test
malformed-unwind-x86_64.test
non-archive-object.test [llvm-objdump] Don't crash when using `-a` on non-archives 2018-10-29 14:17:08 +00:00
option-grouping.test Revert "Revert "[llvm-objdump] Allow short options without arguments to be grouped"" 2019-02-19 19:46:08 +00:00
private-headers-dynamic-section.test
private-headers-no-dynamic-segment.test [yaml2obj][obj2yaml] - Add support for dumping/parsing .dynamic sections. 2019-02-09 11:34:28 +00:00
private-headers-no-dynamic.test
proc-specific-section-elf.test
relocations-elf.test [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when parsing/dumping. 2019-04-03 14:53:42 +00:00
section-filter.test [llvm-objdump] Support arg grouping for -j and -M (e.g. llvm-objdump -sj.foo -dMreg-names-raw) 2019-03-21 18:45:44 +00:00
symbol-table-elf.test [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when parsing/dumping. 2019-04-03 14:53:42 +00:00
verdef-elf.test [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when parsing/dumping. 2019-04-03 14:53:42 +00:00
verneed-elf.test [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when parsing/dumping. 2019-04-03 14:53:42 +00:00
verneed-wrong-info.test [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when parsing/dumping. 2019-04-03 14:53:42 +00:00
wasm-corrupt-section.test
wasm.txt [llvm-objdump] - Print LMAs when dumping section headers. 2019-01-28 14:11:35 +00:00
win64-unwind-data.test