llvm-project/llvm/test/tools/llvm-objdump
Kevin Enderby 95b0842e64 Next step along the way to getting good error messages for bad archives.
I consulted with Lang Hames on this work, and the goal was to add a bit
of "where" in the archive the error occurred along with what the error was.

So this step changes ArchiveMemberHeader into a class with a pointer
to the archive header and the parent archive.  Which allows the methods
in the ArchiveMemberHeader to determine which member the header is
for to include that information in the error message.

For this first step the "where" is just the offset to the member in the
archive.  The next step will be a new method on ArchiveMemberHeader
to get the full name, if possible, to be use in the error message.  Which
will now be possible as ArchiveMemberHeader contains a pointer to
the Archive with its string table and its size, etc. so the full name can
be determined from the header if it is valid.

Also this change adds the missing checks the archive header is actually
contained in the buffer and is not truncated, as well as if the terminating
characters are correct in the header.

And changes one error message in Archive::Child::getNext() where the
name or offset to member is now added.

llvm-svn: 276686
2016-07-25 20:36:36 +00:00
..
AArch64 Update the AArch64ExternalSymbolizer to print literal strings as escaped strings 2016-06-13 21:08:57 +00:00
ARM llvm-objdump: extend __mh_execute_header handling to other special syms 2016-07-14 23:13:03 +00:00
Inputs Next step along the way to getting good error messages for bad archives. 2016-07-25 20:36:36 +00:00
X86 llvm-objdump: handle stubbed and malformed dylibs better 2016-07-14 22:13:32 +00:00
coff-file.test
coff-large-bss.test
coff-many-relocs.test
coff-non-null-terminated-file.test
coff-private-headers.test [llvm-objdump] Add support for dumping the PE TLS directory 2016-03-15 06:14:01 +00:00
common-symbol-elf.test
eh_frame-arm64.test [DebugInfo] Dump CIE augmentation data as a list of hex bytes 2016-03-01 18:38:05 +00:00
eh_frame-mipsel.test [DebugInfo] Dump CIE augmentation data as a list of hex bytes 2016-03-01 18:38:05 +00:00
eh_frame_zero_cie.test [DebugInfo] Support zero-length CIE in the _eh_frame parser 2016-01-27 14:05:35 +00:00
hex-relocation-addr.test
invalid-input.test
macho-LLVM-bundle.test Add the printing the Mach-O (__LLVM,__bundle) xar archive file section "verbosely" 2016-05-23 21:34:12 +00:00
macho-bad-ordinal.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 Add a test case for the crash fixed with r267037. David Blaikie said it would be nice to have! 2016-04-27 20:37:06 +00:00
macho-rebase.test
macho-sections.test Fix bugs in llvm-objdump printing the last word for -section in non i386 and x86 files. 2016-04-27 23:43:00 +00:00
macho-unwind-info-arm64.test
macho-unwind-info-no-relocs.test
macho-unwind-info-x86_64.test
macho-weak-bind.test
malformed-archives.test Next step along the way to getting good error messages for bad archives. 2016-07-25 20:36:36 +00:00
malformed-macho.test Thread Expected<...> up from createMachOObjectFile() to allow llvm-objdump to produce a real error message 2016-04-06 22:14:09 +00:00
proc-specific-section-elf.test
section-filter.test [llvm-objdump] Merging MachO DumpSections in to FilterSections. Simplifying some predicate logic. 2015-07-29 19:08:10 +00:00
win64-unwind-data.test