decompiler
1.0.0
|
A class for reading structured data from a stream. More...
#include <marshal.hh>
Public Member Functions | |
Decoder (const AddrSpaceManager *spc) | |
Base constructor. | |
const AddrSpaceManager * | getAddrSpaceManager (void) const |
Get the manager used for address space decoding. | |
virtual | ~Decoder (void) |
Destructor. | |
virtual void | ingestStream (istream &s)=0 |
Prepare to decode a given stream. More... | |
virtual uint4 | peekElement (void)=0 |
Peek at the next child element of the current parent, without traversing in (opening) it. More... | |
virtual uint4 | openElement (void)=0 |
Open (traverse into) the next child element of the current parent. More... | |
virtual uint4 | openElement (const ElementId &elemId)=0 |
Open (traverse into) the next child element, which must be of a specific type. More... | |
virtual void | closeElement (uint4 id)=0 |
Close the current element. More... | |
virtual void | closeElementSkipping (uint4 id)=0 |
Close the current element, skipping any child elements that have not yet been parsed. More... | |
virtual uint4 | getNextAttributeId (void)=0 |
Get the next attribute id for the current element. More... | |
virtual uint4 | getIndexedAttributeId (const AttributeId &attribId)=0 |
Get the id for the (current) attribute, assuming it is indexed. More... | |
virtual void | rewindAttributes (void)=0 |
Reset attribute traversal for the current element. More... | |
virtual bool | readBool (void)=0 |
Parse the current attribute as a boolean value. More... | |
virtual bool | readBool (const AttributeId &attribId)=0 |
Find and parse a specific attribute in the current element as a boolean value. More... | |
virtual intb | readSignedInteger (void)=0 |
Parse the current attribute as a signed integer value. More... | |
virtual intb | readSignedInteger (const AttributeId &attribId)=0 |
Find and parse a specific attribute in the current element as a signed integer. More... | |
virtual intb | readSignedIntegerExpectString (const string &expect, intb expectval)=0 |
Parse the current attribute as either a signed integer value or a string. More... | |
virtual intb | readSignedIntegerExpectString (const AttributeId &attribId, const string &expect, intb expectval)=0 |
Find and parse a specific attribute in the current element as either a signed integer or a string. More... | |
virtual uintb | readUnsignedInteger (void)=0 |
Parse the current attribute as an unsigned integer value. More... | |
virtual uintb | readUnsignedInteger (const AttributeId &attribId)=0 |
Find and parse a specific attribute in the current element as an unsigned integer. More... | |
virtual string | readString (void)=0 |
Parse the current attribute as a string. More... | |
virtual string | readString (const AttributeId &attribId)=0 |
Find the specific attribute in the current element and return it as a string. More... | |
virtual AddrSpace * | readSpace (void)=0 |
Parse the current attribute as an address space. More... | |
virtual AddrSpace * | readSpace (const AttributeId &attribId)=0 |
Find the specific attribute in the current element and return it as an address space. More... | |
void | skipElement (void) |
Skip parsing of the next element. More... | |
Protected Attributes | |
const AddrSpaceManager * | spcManager |
Manager for decoding address space attributes. | |
A class for reading structured data from a stream.
All data is loosely structured as with an XML document. A document contains a nested set of elements, with labels corresponding to the ElementId class. A single element can hold zero or more attributes and zero or more child elements. An attribute holds a primitive data element (bool, integer, string) and is labeled by an AttributeId. The document is traversed using a sequence of openElement() and closeElement() calls, intermixed with read*() calls to extract the data. The elements are traversed in a depth first order. Attributes within an element can be traversed in order using repeated calls to the getNextAttributeId() method, followed by a calls to one of the read*(void) methods to extract the data. Alternately a read*(AttributeId) call can be used to extract data for an attribute known to be in the element. There is a special content attribute whose data can be extracted using a read*(AttributeId) call that is passed the special ATTRIB_CONTENT id. This attribute will not be traversed by getNextAttribute().
|
pure virtual |
Close the current element.
The data for the current element is considered fully processed. If the element has additional children, an exception is thrown. The stream must indicate the end of the element in some way.
id | is the id of the element to close (which must be the current element) |
Implemented in ghidra::PackedDecode, and ghidra::XmlDecode.
Referenced by ghidra::Scope::addMapSym(), ghidra::GhidraTranslate::decode(), ghidra::VarnodeData::decode(), ghidra::CompilerTag::decode(), ghidra::InjectCallotherGhidra::decode(), ghidra::BlockEdge::decode(), ghidra::LoadTable::decode(), ghidra::StringManager::decode(), ghidra::Comment::decode(), ghidra::LanguageDescription::decode(), ghidra::TrackedContext::decode(), ghidra::TruncationTag::decode(), ghidra::Override::decode(), ghidra::CPoolRecord::decode(), ghidra::OptionDatabase::decode(), ghidra::LanedRegister::decode(), ghidra::PcodeOpRaw::decode(), ghidra::ParamEntry::decode(), ghidra::SymbolEntry::decode(), ghidra::SeqNum::decode(), ghidra::AddrSpace::decode(), ghidra::CommentDatabaseInternal::decode(), ghidra::SpacebaseSpace::decode(), ghidra::ConstantPoolInternal::CheapSorter::decode(), ghidra::FlowBlock::decode(), ghidra::Funcdata::decode(), ghidra::ConstantPoolInternal::decode(), ghidra::Range::decode(), ghidra::RangeProperties::decode(), ghidra::SegmentOp::decode(), ghidra::RangeList::decode(), ghidra::Symbol::decode(), ghidra::JumpAssistOp::decode(), ghidra::OverlaySpace::decode(), ghidra::FunctionSymbol::decode(), ghidra::ContextInternal::decode(), ghidra::EquateSymbol::decode(), ghidra::UnionFacetSymbol::decode(), ghidra::LabSymbol::decode(), ghidra::ExternRefSymbol::decode(), ghidra::TypeEnum::decode(), ghidra::JumpBasicOverride::decode(), ghidra::TypePointerRel::decode(), ghidra::JumpTable::decode(), ghidra::ParamListStandard::decode(), ghidra::TypeFactory::decode(), ghidra::ScopeInternal::decode(), ghidra::Database::decode(), ghidra::ProtoModel::decode(), ghidra::ProtoModelMerged::decode(), ghidra::ProtoStoreInternal::decode(), ghidra::Architecture::decodeAggressiveTrim(), ghidra::BlockGraph::decodeBody(), ghidra::ScopeInternal::decodeCollision(), ghidra::ContextInternal::decodeContext(), ghidra::TypeFactory::decodeCoreTypes(), ghidra::TypeFactory::decodeDataOrganization(), ghidra::Architecture::decodeDeadcodeDelay(), ghidra::Architecture::decodeDefaultProto(), ghidra::Architecture::decodeDynamicRule(), ghidra::Architecture::decodeFlowOverride(), ghidra::ContextInternal::decodeFromSpec(), ghidra::Architecture::decodeFuncPtrAlign(), ghidra::Architecture::decodeGlobal(), ghidra::ScopeGhidra::decodeHole(), ghidra::ScopeInternal::decodeHole(), ghidra::Architecture::decodeIncidentalCopy(), ghidra::Architecture::decodeInferPtrBounds(), ghidra::Funcdata::decodeJumpTable(), ghidra::Architecture::decodeLaneSizes(), ghidra::Architecture::decodeNoHighPtr(), ghidra::OptionDatabase::decodeOne(), ghidra::PcodeEmit::decodeOp(), ghidra::InjectPayload::decodeParameter(), ghidra::Architecture::decodePreferSplit(), ghidra::Architecture::decodeProtoEval(), ghidra::Architecture::decodeReadOnly(), ghidra::Architecture::decodeReturnAddress(), ghidra::Database::decodeScope(), ghidra::Database::decodeScopePath(), ghidra::Architecture::decodeSpacebase(), ghidra::AddrSpaceManager::decodeSpaces(), ghidra::Architecture::decodeStackPointer(), ghidra::TypeFactory::decodeType(), ghidra::TypeFactory::decodeTypeNoRef(), ghidra::TypeFactory::decodeTypeWithCodeFlags(), ghidra::Architecture::decodeVolatile(), ghidra::ScopeGhidra::dump2Cache(), ghidra::TypeFactory::parseEnumConfig(), ghidra::ParamListStandard::parseGroup(), ghidra::Database::parseParentTag(), and ghidra::TypeField::TypeField().
|
pure virtual |
Close the current element, skipping any child elements that have not yet been parsed.
This closes the given element, which must be current. If there are child elements that have not been parsed, this is not considered an error, and they are skipped over in the parse.
id | is the id of the element to close (which must be the current element) |
Implemented in ghidra::PackedDecode, and ghidra::XmlDecode.
Referenced by ghidra::InjectPayloadGhidra::decode(), ghidra::InjectCallfixupGhidra::decode(), ghidra::InjectCallotherGhidra::decode(), ghidra::ExecutablePcodeGhidra::decode(), ghidra::LanguageDescription::decode(), ghidra::TypeFactory::decodeDataOrganization(), and ghidra::Database::decodeScopePath().
|
pure virtual |
Get the id for the (current) attribute, assuming it is indexed.
Assuming the previous call to getNextAttributeId() returned the id of ATTRIB_UNKNOWN, reinterpret the attribute as being an indexed form of the given attribute. If the attribute matches, return this indexed id, otherwise return ATTRIB_UNKNOWN.
attribId | is the attribute being indexed |
Implemented in ghidra::PackedDecode, and ghidra::XmlDecode.
Referenced by ghidra::JoinSpace::decodeAttributes().
|
pure virtual |
Get the next attribute id for the current element.
Attributes are automatically set up for traversal using this method, when the element is opened. If all attributes have been traversed (or there are no attributes), 0 is returned.
Implemented in ghidra::PackedDecode, and ghidra::XmlDecode.
Referenced by ghidra::LanguageDescription::decode(), ghidra::CPoolRecord::decode(), ghidra::LanedRegister::decode(), ghidra::ParamEntry::decode(), ghidra::SeqNum::decode(), ghidra::Funcdata::decode(), ghidra::RangeProperties::decode(), ghidra::SegmentOp::decode(), ghidra::FunctionSymbol::decode(), ghidra::ContextInternal::decode(), ghidra::TypePointer::decode(), ghidra::ExternRefSymbol::decode(), ghidra::TypeArray::decode(), ghidra::TypeEnum::decode(), ghidra::TypePointerRel::decode(), ghidra::JumpTable::decode(), ghidra::ParamListStandard::decode(), ghidra::Database::decode(), ghidra::ProtoModel::decode(), ghidra::ProtoStoreInternal::decode(), ghidra::FuncProto::decode(), ghidra::Architecture::decodeAggressiveTrim(), ghidra::AddrSpace::decodeAttributes(), ghidra::JoinSpace::decodeAttributes(), ghidra::Datatype::decodeBasic(), ghidra::AddrSpace::decodeBasicAttributes(), ghidra::Architecture::decodeDynamicRule(), ghidra::VarnodeData::decodeFromAttributes(), ghidra::Range::decodeFromAttributes(), ghidra::Symbol::decodeHeader(), ghidra::ScopeGhidra::decodeHole(), ghidra::ScopeInternal::decodeHole(), ghidra::InjectPayload::decodeParameter(), ghidra::InjectPayload::decodePayloadAttributes(), ghidra::Database::decodeScopePath(), ghidra::Architecture::decodeStackPointer(), ghidra::TypeFactory::decodeType(), ghidra::TypeFactory::decodeTypedef(), ghidra::TypeFactory::decodeTypeNoRef(), ghidra::TypeFactory::decodeTypeWithCodeFlags(), ghidra::UserOpManage::decodeVolatile(), and ghidra::TypeField::TypeField().
|
pure virtual |
Prepare to decode a given stream.
Called once before any decoding. Currently this is assumed to make an internal copy of the stream data, i.e. the input stream is cleared before any decoding takes place.
s | is the given input stream to be decode |
Implemented in ghidra::PackedDecode, and ghidra::XmlDecode.
Referenced by ghidra::ArchitectureGhidra::readStringStream().
|
pure virtual |
Open (traverse into) the next child element of the current parent.
The child becomes the current parent. The list of attributes is initialized for use with getNextAttributeId.
Implemented in ghidra::PackedDecode, and ghidra::XmlDecode.
Referenced by ghidra::Scope::addMapSym(), ghidra::GhidraTranslate::decode(), ghidra::InjectPayloadGhidra::decode(), ghidra::VarnodeData::decode(), ghidra::CompilerTag::decode(), ghidra::InjectCallfixupGhidra::decode(), ghidra::InjectCallotherGhidra::decode(), ghidra::BlockEdge::decode(), ghidra::LoadTable::decode(), ghidra::StringManager::decode(), ghidra::Comment::decode(), ghidra::ExecutablePcodeGhidra::decode(), ghidra::LanguageDescription::decode(), ghidra::TrackedContext::decode(), ghidra::TruncationTag::decode(), ghidra::Override::decode(), ghidra::CPoolRecord::decode(), ghidra::OptionDatabase::decode(), ghidra::LanedRegister::decode(), ghidra::PcodeOpRaw::decode(), ghidra::ParamEntry::decode(), ghidra::SymbolEntry::decode(), ghidra::SeqNum::decode(), ghidra::AddrSpace::decode(), ghidra::CommentDatabaseInternal::decode(), ghidra::SpacebaseSpace::decode(), ghidra::ConstantPoolInternal::CheapSorter::decode(), ghidra::FlowBlock::decode(), ghidra::Funcdata::decode(), ghidra::ConstantPoolInternal::decode(), ghidra::Range::decode(), ghidra::RangeProperties::decode(), ghidra::SegmentOp::decode(), ghidra::RangeList::decode(), ghidra::Symbol::decode(), ghidra::JumpAssistOp::decode(), ghidra::OverlaySpace::decode(), ghidra::FunctionSymbol::decode(), ghidra::ContextInternal::decode(), ghidra::EquateSymbol::decode(), ghidra::UnionFacetSymbol::decode(), ghidra::LabSymbol::decode(), ghidra::ExternRefSymbol::decode(), ghidra::TypeEnum::decode(), ghidra::JumpBasicOverride::decode(), ghidra::TypePointerRel::decode(), ghidra::JumpTable::decode(), ghidra::ParamListStandard::decode(), ghidra::TypeFactory::decode(), ghidra::ScopeInternal::decode(), ghidra::Database::decode(), ghidra::ProtoModel::decode(), ghidra::ProtoModelMerged::decode(), ghidra::ProtoStoreInternal::decode(), ghidra::FuncProto::decode(), ghidra::Architecture::decodeAggressiveTrim(), ghidra::BlockGraph::decodeBody(), ghidra::ScopeInternal::decodeCollision(), ghidra::ContextInternal::decodeContext(), ghidra::TypeFactory::decodeCoreTypes(), ghidra::TypeFactory::decodeDataOrganization(), ghidra::Architecture::decodeDeadcodeDelay(), ghidra::Architecture::decodeDefaultProto(), ghidra::Architecture::decodeDynamicRule(), ghidra::Architecture::decodeFlowOverride(), ghidra::ContextInternal::decodeFromSpec(), ghidra::Architecture::decodeFuncPtrAlign(), ghidra::Architecture::decodeGlobal(), ghidra::ScopeGhidra::decodeHole(), ghidra::ScopeInternal::decodeHole(), ghidra::Architecture::decodeIncidentalCopy(), ghidra::Architecture::decodeInferPtrBounds(), ghidra::Funcdata::decodeJumpTable(), ghidra::Architecture::decodeLaneSizes(), ghidra::Architecture::decodeNoHighPtr(), ghidra::OptionDatabase::decodeOne(), ghidra::PcodeEmit::decodeOp(), ghidra::InjectPayload::decodeParameter(), ghidra::Architecture::decodePreferSplit(), ghidra::Architecture::decodeProtoEval(), ghidra::Architecture::decodeReadOnly(), ghidra::Architecture::decodeReturnAddress(), ghidra::Database::decodeScope(), ghidra::Database::decodeScopePath(), ghidra::Architecture::decodeSpacebase(), ghidra::AddrSpaceManager::decodeSpaces(), ghidra::Architecture::decodeStackPointer(), ghidra::TypeFactory::decodeType(), ghidra::TypeFactory::decodeTypeNoRef(), ghidra::TypeFactory::decodeTypeWithCodeFlags(), ghidra::Architecture::decodeVolatile(), ghidra::ScopeGhidra::dump2Cache(), ghidra::TypeFactory::parseEnumConfig(), ghidra::ParamListStandard::parseGroup(), ghidra::Database::parseParentTag(), and ghidra::TypeField::TypeField().
|
pure virtual |
Open (traverse into) the next child element, which must be of a specific type.
The child becomes the current parent, and its attributes are initialized for use with getNextAttributeId. The child must match the given element id or an exception is thrown.
elemId | is the given element id to match |
Implemented in ghidra::PackedDecode, and ghidra::XmlDecode.
|
pure virtual |
Peek at the next child element of the current parent, without traversing in (opening) it.
The element id is returned, which can be compared to ElementId labels. If there are no remaining child elements to traverse, 0 is returned.
Implemented in ghidra::PackedDecode, and ghidra::XmlDecode.
Referenced by ghidra::Scope::addMapSym(), ghidra::GhidraTranslate::decode(), ghidra::Comment::decode(), ghidra::LanguageDescription::decode(), ghidra::OptionDatabase::decode(), ghidra::PcodeOpRaw::decode(), ghidra::SymbolEntry::decode(), ghidra::CommentDatabaseInternal::decode(), ghidra::Funcdata::decode(), ghidra::ConstantPoolInternal::decode(), ghidra::SegmentOp::decode(), ghidra::RangeList::decode(), ghidra::JumpAssistOp::decode(), ghidra::FunctionSymbol::decode(), ghidra::JumpTable::decode(), ghidra::ParamListStandard::decode(), ghidra::TypeFactory::decode(), ghidra::ScopeInternal::decode(), ghidra::Database::decode(), ghidra::ProtoModel::decode(), ghidra::BlockGraph::decodeBody(), ghidra::TypeFactory::decodeCoreTypes(), ghidra::Architecture::decodeDefaultProto(), ghidra::FlowBlock::decodeEdges(), ghidra::TypeStruct::decodeFields(), ghidra::TypeUnion::decodeFields(), ghidra::Architecture::decodeGlobal(), ghidra::Architecture::decodeIncidentalCopy(), ghidra::Architecture::decodeInferPtrBounds(), ghidra::Funcdata::decodeJumpTable(), ghidra::Architecture::decodeLaneSizes(), ghidra::Architecture::decodeNoHighPtr(), ghidra::InjectPayload::decodePayloadParams(), ghidra::Architecture::decodePreferSplit(), ghidra::Architecture::decodeProto(), ghidra::TypeCode::decodePrototype(), ghidra::Architecture::decodeReadOnly(), ghidra::Architecture::decodeReturnAddress(), ghidra::AddrSpaceManager::decodeSpace(), ghidra::AddrSpaceManager::decodeSpaces(), ghidra::TypeCode::decodeStub(), ghidra::ContextDatabase::decodeTracked(), ghidra::TypeFactory::decodeType(), ghidra::Architecture::decodeVolatile(), ghidra::ScopeGhidra::dump2Cache(), and ghidra::ParamListStandard::parseGroup().
|
pure virtual |
Parse the current attribute as a boolean value.
The last attribute, as returned by getNextAttributeId, is treated as a boolean, and its value is returned.
Implemented in ghidra::PackedDecode, and ghidra::XmlDecode.
Referenced by ghidra::GhidraTranslate::decode(), ghidra::StringManager::decode(), ghidra::LanguageDescription::decode(), ghidra::CPoolRecord::decode(), ghidra::Funcdata::decode(), ghidra::ParamListStandard::decode(), ghidra::TypeFactory::decode(), ghidra::Database::decode(), ghidra::ProtoModel::decode(), ghidra::ProtoStoreInternal::decode(), ghidra::FuncProto::decode(), ghidra::Architecture::decodeAggressiveTrim(), ghidra::Datatype::decodeBasic(), ghidra::AddrSpace::decodeBasicAttributes(), ghidra::Architecture::decodeDynamicRule(), ghidra::Symbol::decodeHeader(), ghidra::ScopeGhidra::decodeHole(), ghidra::ScopeInternal::decodeHole(), ghidra::InjectPayload::decodePayloadAttributes(), ghidra::Architecture::decodeStackPointer(), ghidra::TypeFactory::decodeTypeNoRef(), ghidra::ScopeLocal::decodeWrappingAttributes(), and ghidra::TypeFactory::parseEnumConfig().
|
pure virtual |
Find and parse a specific attribute in the current element as a boolean value.
The set of attributes for the current element is searched for a match to the given attribute id. This attribute is then parsed as a boolean and its value returned. If there is no attribute matching the id, an exception is thrown. Parsing via getNextAttributeId is reset.
attribId | is the specific attribute id to match |
Implemented in ghidra::PackedDecode, and ghidra::XmlDecode.
|
pure virtual |
Parse the current attribute as a signed integer value.
The last attribute, as returned by getNextAttributeId, is treated as a signed integer, and its value is returned.
Implemented in ghidra::PackedDecode, and ghidra::XmlDecode.
Referenced by ghidra::BlockEdge::decode(), ghidra::LoadTable::decode(), ghidra::LanguageDescription::decode(), ghidra::Override::decode(), ghidra::CPoolRecord::decode(), ghidra::PcodeOpRaw::decode(), ghidra::ParamEntry::decode(), ghidra::Funcdata::decode(), ghidra::OverlaySpace::decode(), ghidra::UnionFacetSymbol::decode(), ghidra::TypeArray::decode(), ghidra::TypeEnum::decode(), ghidra::TypePointerRel::decode(), ghidra::ParamListStandard::decode(), ghidra::TypeFactory::decode(), ghidra::AddrSpace::decodeAttributes(), ghidra::Datatype::decodeBasic(), ghidra::AddrSpace::decodeBasicAttributes(), ghidra::BlockGraph::decodeBody(), ghidra::TypeFactory::decodeDataOrganization(), ghidra::Architecture::decodeDeadcodeDelay(), ghidra::Architecture::decodeFuncPtrAlign(), ghidra::FlowBlock::decodeHeader(), ghidra::Symbol::decodeHeader(), ghidra::PcodeEmit::decodeOp(), ghidra::InjectPayload::decodePayloadAttributes(), ghidra::TypeFactory::decodeType(), ghidra::TypeFactory::parseEnumConfig(), and ghidra::TypeField::TypeField().
|
pure virtual |
Find and parse a specific attribute in the current element as a signed integer.
The set of attributes for the current element is searched for a match to the given attribute id. This attribute is then parsed as a signed integer and its value returned. If there is no attribute matching the id, an exception is thrown. Parsing via getNextAttributeId is reset.
attribId | is the specific attribute id to match |
Implemented in ghidra::PackedDecode, and ghidra::XmlDecode.
|
pure virtual |
Parse the current attribute as either a signed integer value or a string.
If the attribute is an integer, its value is returned. If the attribute is a string, it must match an expected string passed to the method, and a predetermined integer value associated with the string is returned. If the attribute neither matches the expected string nor is an integer, the return value is undefined.
expect | is the string value to expect if the attribute is encoded as a string |
expectval | is the integer value to return if the attribute matches the expected string |
Implemented in ghidra::PackedDecode, and ghidra::XmlDecode.
Referenced by ghidra::ProtoModel::decode(), and ghidra::FuncProto::decode().
|
pure virtual |
Find and parse a specific attribute in the current element as either a signed integer or a string.
If the attribute is an integer, its value is parsed and returned. If the attribute is encoded as a string, it must match an expected string passed to this method. In this case, a predetermined integer value is passed back, indicating a matching string was parsed. If the attribute neither matches the expected string nor is an integer, the return value is undefined. If there is no attribute matching the id, an exception is thrown.
attribId | is the specific attribute id to match |
expect | is the string to expect, if the attribute is not encoded as an integer |
expectval | is the integer value to return if the attribute matches the expected string |
Implemented in ghidra::PackedDecode, and ghidra::XmlDecode.
|
pure virtual |
Parse the current attribute as an address space.
The last attribute, as returned by getNextAttributeId, is returned as an address space.
Implemented in ghidra::PackedDecode, and ghidra::XmlDecode.
Referenced by ghidra::Override::decode(), ghidra::PcodeOpRaw::decode(), ghidra::SpacebaseSpace::decode(), ghidra::SegmentOp::decode(), ghidra::OverlaySpace::decode(), ghidra::TypePointer::decode(), ghidra::TypePointerRel::decode(), ghidra::TypeSpacebase::decode(), ghidra::Architecture::decodeDeadcodeDelay(), ghidra::VarnodeData::decodeFromAttributes(), ghidra::Range::decodeFromAttributes(), ghidra::Architecture::decodeSpacebase(), ghidra::Architecture::decodeStackPointer(), and ghidra::ScopeLocal::decodeWrappingAttributes().
|
pure virtual |
Find the specific attribute in the current element and return it as an address space.
Search attributes from the current element for a match to the given attribute id. Return this attribute as an address space. If there is no attribute matching the id, an exception is thrown. Parse via getNextAttributeId is reset.
attribId | is the specific attribute id to match |
Implemented in ghidra::PackedDecode, and ghidra::XmlDecode.
|
pure virtual |
Parse the current attribute as a string.
The last attribute, as returned by getNextAttributeId, is returned as a string.
Implemented in ghidra::PackedDecode, and ghidra::XmlDecode.
Referenced by ghidra::CompilerTag::decode(), ghidra::InjectCallfixupGhidra::decode(), ghidra::InjectCallotherGhidra::decode(), ghidra::StringManager::decode(), ghidra::Comment::decode(), ghidra::LanguageDescription::decode(), ghidra::TruncationTag::decode(), ghidra::Override::decode(), ghidra::CPoolRecord::decode(), ghidra::LanedRegister::decode(), ghidra::ParamEntry::decode(), ghidra::Funcdata::decode(), ghidra::RangeProperties::decode(), ghidra::SegmentOp::decode(), ghidra::JumpAssistOp::decode(), ghidra::OverlaySpace::decode(), ghidra::FunctionSymbol::decode(), ghidra::ExternRefSymbol::decode(), ghidra::TypeEnum::decode(), ghidra::Database::decode(), ghidra::ProtoModel::decode(), ghidra::ProtoModelMerged::decode(), ghidra::ProtoStoreInternal::decode(), ghidra::FuncProto::decode(), ghidra::JoinSpace::decodeAttributes(), ghidra::Datatype::decodeBasic(), ghidra::AddrSpace::decodeBasicAttributes(), ghidra::BlockGraph::decodeBody(), ghidra::ScopeInternal::decodeCollision(), ghidra::ContextInternal::decodeContext(), ghidra::Architecture::decodeDynamicRule(), ghidra::Architecture::decodeFlowOverride(), ghidra::VarnodeData::decodeFromAttributes(), ghidra::Range::decodeFromAttributes(), ghidra::Symbol::decodeHeader(), ghidra::OptionDatabase::decodeOne(), ghidra::InjectPayload::decodeParameter(), ghidra::InjectPayload::decodePayloadAttributes(), ghidra::Architecture::decodePreferSplit(), ghidra::Architecture::decodeProtoEval(), ghidra::Database::decodeScopePath(), ghidra::Architecture::decodeSpacebase(), ghidra::AddrSpaceManager::decodeSpaces(), ghidra::Architecture::decodeStackPointer(), ghidra::TypeFactory::decodeType(), ghidra::TypeFactory::decodeTypedef(), ghidra::TypeFactory::decodeTypeNoRef(), ghidra::UserOpManage::decodeVolatile(), and ghidra::TypeField::TypeField().
|
pure virtual |
Find the specific attribute in the current element and return it as a string.
The set of attributes for the current element is searched for a match to the given attribute id. This attribute is then returned as a string. If there is no attribute matching the id, and exception is thrown. Parse via getNextAttributeId is reset.
attribId | is the specific attribute id to match |
Implemented in ghidra::PackedDecode, and ghidra::XmlDecode.
|
pure virtual |
Parse the current attribute as an unsigned integer value.
The last attribute, as returned by getNextAttributeId, is treated as an unsigned integer, and its value is returned.
Implemented in ghidra::PackedDecode, and ghidra::XmlDecode.
Referenced by ghidra::GhidraTranslate::decode(), ghidra::TrackedContext::decode(), ghidra::TruncationTag::decode(), ghidra::CPoolRecord::decode(), ghidra::SymbolEntry::decode(), ghidra::SeqNum::decode(), ghidra::ConstantPoolInternal::CheapSorter::decode(), ghidra::Funcdata::decode(), ghidra::RangeProperties::decode(), ghidra::FunctionSymbol::decode(), ghidra::EquateSymbol::decode(), ghidra::TypePointer::decode(), ghidra::JumpBasicOverride::decode(), ghidra::TypePointerRel::decode(), ghidra::JumpTable::decode(), ghidra::Database::decode(), ghidra::AddrSpace::decodeAttributes(), ghidra::JoinSpace::decodeAttributes(), ghidra::Datatype::decodeBasic(), ghidra::AddrSpace::decodeBasicAttributes(), ghidra::ContextInternal::decodeContext(), ghidra::Range::decodeFromAttributes(), ghidra::Symbol::decodeHeader(), ghidra::InjectPayload::decodeParameter(), ghidra::Database::decodeScopePath(), ghidra::TypeFactory::decodeType(), ghidra::TypeFactory::decodeTypedef(), ghidra::TypeFactory::decodeTypeWithCodeFlags(), ghidra::ScopeGhidra::dump2Cache(), and ghidra::Database::parseParentTag().
|
pure virtual |
Find and parse a specific attribute in the current element as an unsigned integer.
The set of attributes for the current element is searched for a match to the given attribute id. This attribute is then parsed as an unsigned integer and its value returned. If there is no attribute matching the id, an exception is thrown. Parsing via getNextAttributeId is reset.
attribId | is the specific attribute id to match |
Implemented in ghidra::PackedDecode, and ghidra::XmlDecode.
|
pure virtual |
Reset attribute traversal for the current element.
Attributes for a single element can be traversed more than once using the getNextAttributeId method.
Implemented in ghidra::PackedDecode, and ghidra::XmlDecode.
Referenced by ghidra::LanedRegister::decode(), ghidra::ContextInternal::decode(), ghidra::TypePointer::decode(), ghidra::TypeArray::decode(), ghidra::TypePointerRel::decode(), ghidra::VarnodeData::decodeFromAttributes(), ghidra::ScopeGhidra::decodeHole(), ghidra::ScopeInternal::decodeHole(), and ghidra::TypeFactory::decodeTypeNoRef().
|
inline |
Skip parsing of the next element.
The element skipped is the one that would be opened by the next call to openElement.
Referenced by ghidra::ContextGhidra::decode(), ghidra::ScopeInternal::decode(), and ghidra::ContextGhidra::decodeFromSpec().