LLVM 20.0.0git
|
#include "llvm/Support/ELFAttributeParser.h"
Public Member Functions | |
virtual | ~ELFAttributeParser () |
Error | integerAttribute (unsigned tag) |
Error | stringAttribute (unsigned tag) |
ELFAttributeParser (ScopedPrinter *sw, TagNameMap tagNameMap, StringRef vendor) | |
ELFAttributeParser (TagNameMap tagNameMap, StringRef vendor) | |
Error | parse (ArrayRef< uint8_t > section, llvm::endianness endian) |
std::optional< unsigned > | getAttributeValue (unsigned tag) const |
std::optional< StringRef > | getAttributeString (unsigned tag) const |
Protected Member Functions | |
void | printAttribute (unsigned tag, unsigned value, StringRef valueDesc) |
Error | parseStringAttribute (const char *name, unsigned tag, ArrayRef< const char * > strings) |
Error | parseAttributeList (uint32_t length) |
void | parseIndexList (SmallVectorImpl< uint8_t > &indexList) |
Error | parseSubsection (uint32_t length) |
void | setAttributeString (unsigned tag, StringRef value) |
Protected Attributes | |
ScopedPrinter * | sw |
TagNameMap | tagToStringMap |
DataExtractor | de {ArrayRef<uint8_t>{}, true, 0} |
DataExtractor::Cursor | cursor {0} |
Definition at line 24 of file ELFAttributeParser.h.
|
inlinevirtual |
Definition at line 50 of file ELFAttributeParser.h.
References cursor, and llvm::DataExtractor::Cursor::takeError().
|
inline |
Definition at line 54 of file ELFAttributeParser.h.
|
inline |
Definition at line 57 of file ELFAttributeParser.h.
|
inline |
Definition at line 68 of file ELFAttributeParser.h.
References I.
Definition at line 62 of file ELFAttributeParser.h.
References I.
Definition at line 36 of file ELFAttributeParser.cpp.
References llvm::ELFAttrs::attrTypeAsString(), cursor, de, llvm::StringRef::empty(), llvm::DataExtractor::getULEB128(), llvm::ScopedPrinter::printNumber(), llvm::ScopedPrinter::printString(), llvm::Error::success(), sw, tagToStringMap, and value.
Referenced by parseAttributeList().
Error ELFAttributeParser::parse | ( | ArrayRef< uint8_t > | section, |
llvm::endianness | endian | ||
) |
Definition at line 191 of file ELFAttributeParser.cpp.
References clear(), llvm::consumeError(), llvm::createStringError(), cursor, de, llvm::DataExtractor::eof(), llvm::ELFAttrs::Format_Version, llvm::DataExtractor::getU32(), llvm::DataExtractor::getU8(), llvm::ScopedPrinter::indent(), llvm::invalid_argument, llvm::little, parseSubsection(), llvm::ArrayRef< T >::size(), llvm::ScopedPrinter::startLine(), sw, llvm::DataExtractor::Cursor::takeError(), llvm::DataExtractor::Cursor::tell(), and llvm::ScopedPrinter::unindent().
Definition at line 94 of file ELFAttributeParser.cpp.
References llvm::createStringError(), cursor, de, llvm::DataExtractor::getULEB128(), integerAttribute(), llvm::invalid_argument, stringAttribute(), llvm::Error::success(), llvm::DataExtractor::Cursor::tell(), and llvm::Twine::utohexstr().
Referenced by parseSubsection().
|
protected |
Definition at line 85 of file ELFAttributeParser.cpp.
References cursor, de, llvm::DataExtractor::getULEB128(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and value.
Referenced by parseSubsection().
|
protected |
Definition at line 23 of file ELFAttributeParser.cpp.
References llvm::createStringError(), cursor, de, llvm::DataExtractor::getULEB128(), llvm::invalid_argument, name, printAttribute(), llvm::ArrayRef< T >::size(), llvm::Error::success(), and value.
Tag_File | Tag_Section | Tag_Symbol uleb128:byte-size
Definition at line 122 of file ELFAttributeParser.cpp.
References llvm::createStringError(), cursor, de, llvm::SmallVectorBase< Size_T >::empty(), llvm::ELFAttrs::File, llvm::DataExtractor::getCStrRef(), llvm::DataExtractor::getU32(), llvm::DataExtractor::getU8(), llvm::invalid_argument, llvm::StringRef::lower(), parseAttributeList(), parseIndexList(), llvm::ScopedPrinter::printEnum(), llvm::ScopedPrinter::printList(), llvm::ScopedPrinter::printNumber(), llvm::ScopedPrinter::printString(), llvm::ELFAttrs::Section, llvm::DataExtractor::Cursor::seek(), llvm::size(), llvm::Error::success(), sw, llvm::ELFAttrs::Symbol, tagNames, llvm::DataExtractor::Cursor::takeError(), llvm::DataExtractor::Cursor::tell(), and llvm::Twine::utohexstr().
Referenced by parse().
|
protected |
Definition at line 68 of file ELFAttributeParser.cpp.
References llvm::ELFAttrs::attrTypeAsString(), llvm::StringRef::empty(), llvm::ScopedPrinter::printNumber(), llvm::ScopedPrinter::printString(), sw, tagToStringMap, and value.
Referenced by parseStringAttribute().
Definition at line 45 of file ELFAttributeParser.h.
References value.
Referenced by stringAttribute().
Definition at line 52 of file ELFAttributeParser.cpp.
References llvm::ELFAttrs::attrTypeAsString(), cursor, de, llvm::StringRef::empty(), llvm::DataExtractor::getCStrRef(), llvm::ScopedPrinter::printNumber(), llvm::ScopedPrinter::printString(), setAttributeString(), llvm::Error::success(), sw, and tagToStringMap.
Referenced by parseAttributeList().
|
protected |
Definition at line 35 of file ELFAttributeParser.h.
Referenced by integerAttribute(), parse(), parseAttributeList(), parseIndexList(), parseStringAttribute(), parseSubsection(), stringAttribute(), and ~ELFAttributeParser().
|
protected |
Definition at line 34 of file ELFAttributeParser.h.
Referenced by integerAttribute(), parse(), parseAttributeList(), parseIndexList(), parseStringAttribute(), parseSubsection(), and stringAttribute().
|
protected |
Definition at line 32 of file ELFAttributeParser.h.
Referenced by integerAttribute(), parse(), parseSubsection(), printAttribute(), and stringAttribute().
|
protected |
Definition at line 33 of file ELFAttributeParser.h.
Referenced by integerAttribute(), printAttribute(), and stringAttribute().