OSDN Git Service

Fix MachOObjectFile::getSymbolName() to not call report_fatal_error()
authorKevin Enderby <enderby@apple.com>
Fri, 22 Jan 2016 18:47:14 +0000 (18:47 +0000)
committerKevin Enderby <enderby@apple.com>
Fri, 22 Jan 2016 18:47:14 +0000 (18:47 +0000)
commit161c62450c4a9bc4b9f6550f32541da739a75df9
treeabba72ae14ecbcb0c13b2817177f00a4a30be67e
parent9d32832ffb44b940ba5e3aa09040a3f006c52e96
Fix MachOObjectFile::getSymbolName() to not call report_fatal_error()
but to return object_error::parse_failed.  Then made the code in llvm-nm
do for Mach-O files what is done in the darwin native tools which is to
print "bad string index" for bad string indexes.  Updated the error message
in the llvm-objdump test, and added tests to show llvm-nm prints
"bad string index" and a test to print the actual bad string index value
which in this case is 0xfe000002 when printing the fields as raw hex.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258520 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Object/MachOObjectFile.cpp
test/Object/macho-invalid.test
tools/llvm-nm/llvm-nm.cpp