llvm-project/llvm/tools/llvm-readobj
Ryan Prichard 0c20b5be7c [llvm-readobj] Fix bugs with unrecognized types in switch statements
Summary:
Add missing breaks. Several functions used nested switch statements,
where the outer switch branches based on the architecture, and the inner
switch handles architecture-specific types. If the type isn't
architecture-specific, break out to the generic types rather than fall
through.

getElfPtType: For GNU-style output, llvm-readobj prints
"<unknown>: 0xnnnnnnnn" for an unrecognized segment type, unless the
architecture is EM_ARM, EM_MIPS, or EM_MIPS_RS3_LE, in which case it
prints "". This behavior appears accidental, so instead, always print
the "<unknown>: 0xnnnnnnnn" string.

Reviewers: pcc, grimar

Reviewed By: grimar

Subscribers: sdardis, javed.absar, arichardson, kristof.beyls, atanasyan, llvm-commits

Differential Revision: https://reviews.llvm.org/D53730

llvm-svn: 345436
2018-10-26 23:01:54 +00:00
..
ARMEHABIPrinter.h Instead of ELFFile<ELFT>::Type, use ELFT::Type. NFC. 2018-01-12 02:28:31 +00:00
ARMWinEHPrinter.cpp [ARM64][Windows] Add unwind support to llvm-readobj 2018-10-24 00:03:34 +00:00
ARMWinEHPrinter.h [ARM64][Windows] Add unwind support to llvm-readobj 2018-10-24 00:03:34 +00:00
CMakeLists.txt Reland "[DebugInfo] Support DWARF expressions in eh_frame" 2018-03-08 00:46:53 +00:00
COFFDumper.cpp [ARM64][Windows] Add unwind support to llvm-readobj 2018-10-24 00:03:34 +00:00
COFFImportDumper.cpp Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
DwarfCFIEHPrinter.h Revert r343317 2018-09-28 17:01:50 +00:00
ELFDumper.cpp [llvm-readobj] Fix bugs with unrecognized types in switch statements 2018-10-26 23:01:54 +00:00
Error.cpp
Error.h
LLVMBuild.txt Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
MachODumper.cpp [llvm-readobj] Generic hex-dump option 2018-07-25 10:04:37 +00:00
ObjDumper.cpp [ADT] Replace std::isprint by llvm::isPrint. 2018-07-26 15:31:41 +00:00
ObjDumper.h [llvm-readobj] Generic hex-dump option 2018-07-25 10:04:37 +00:00
StackMapPrinter.h [llvm-readobj] Consistent use of ScopedPrinter 2018-01-10 00:14:19 +00:00
WasmDumper.cpp [WebAssembly] clang-format (NFC) 2018-09-05 01:27:38 +00:00
Win64EHDumper.cpp
Win64EHDumper.h
WindowsResourceDumper.cpp Remove redundant includes from tools. 2017-12-13 21:31:10 +00:00
WindowsResourceDumper.h [llvm-readobj] Teach readobj to dump .res files (WindowsResource). 2017-09-20 18:33:35 +00:00
llvm-readobj.cpp [llvm-readobj] Make some commonly used short options visibile in -help 2018-09-15 21:27:46 +00:00
llvm-readobj.h [llvm-readobj] Add experimental support for SHT_RELR sections 2018-06-28 21:07:34 +00:00