|
decompiler 1.0.0
|
Classes for describing and printing data-types. More...
#include "address.hh"Classes | |
| class | Datatype |
| The base datatype class for the decompiler. More... | |
| struct | TypeField |
| Specifies subfields of a structure or what a pointer points to. More... | |
| struct | DatatypeCompare |
| Compare two Datatype pointers for equivalence of their description. More... | |
| struct | DatatypeNameCompare |
| Compare two Datatype pointers: first by name, then by id. More... | |
| class | TypeBase |
| Base class for the fundamental atomic types. More... | |
| class | TypeChar |
| Base type for character data-types: i.e. char. More... | |
| class | TypeUnicode |
| The unicode data-type: i.e. wchar. More... | |
| class | TypeVoid |
| Formal "void" data-type object. More... | |
| class | TypePointer |
| Datatype object representing a pointer. More... | |
| class | TypeArray |
| Datatype object representing an array of elements. More... | |
| class | TypeEnum |
| An enumerated Datatype object: an integer with named values. More... | |
| class | TypeStruct |
| A composite Datatype object: A "structure" with component "fields". More... | |
| class | TypePointerRel |
| A pointer data-type that knows it is offset relative to another data-type. More... | |
| class | TypeCode |
| Datatype object representing executable code. More... | |
| class | TypeSpacebase |
| Special Datatype object used to describe pointers that index into the symbol table. More... | |
| class | TypeFactory |
| Container class for all Datatype objects in an Architecture. More... | |
Typedefs | |
| typedef set< Datatype *, DatatypeCompare > | DatatypeSet |
| A set of data-types sorted by function. | |
| typedef set< Datatype *, DatatypeNameCompare > | DatatypeNameSet |
| A set of data-types sorted by name. | |
Enumerations | |
| enum | type_metatype { TYPE_VOID = 12 , TYPE_SPACEBASE = 11 , TYPE_UNKNOWN = 10 , TYPE_INT = 9 , TYPE_UINT = 8 , TYPE_BOOL = 7 , TYPE_CODE = 6 , TYPE_FLOAT = 5 , TYPE_PTR = 4 , TYPE_PTRREL = 3 , TYPE_ARRAY = 2 , TYPE_PARTIALSTRUCT = 1 , TYPE_STRUCT = 0 } |
| enum | sub_metatype { SUB_VOID = 20 , SUB_SPACEBASE = 19 , SUB_UNKNOWN = 18 , SUB_INT_CHAR = 17 , SUB_UINT_CHAR = 16 , SUB_INT_PLAIN = 15 , SUB_UINT_PLAIN = 14 , SUB_INT_ENUM = 13 , SUB_UINT_ENUM = 12 , SUB_INT_UNICODE = 11 , SUB_UINT_UNICODE = 10 , SUB_BOOL = 9 , SUB_CODE = 8 , SUB_FLOAT = 7 , SUB_PTRREL_UNK = 6 , SUB_PTR = 5 , SUB_PTRREL = 4 , SUB_PTR_STRUCT = 3 , SUB_ARRAY = 2 , SUB_PARTIALSTRUCT = 1 , SUB_STRUCT = 0 } |
Functions | |
| void | print_data (ostream &s, uint1 *buffer, int4 size, const Address &baseaddr) |
| Print a hex dump of a data buffer to stream. More... | |
| void | metatype2string (type_metatype metatype, string &res) |
| Convert type meta-type to name. More... | |
| type_metatype | string2metatype (const string &metastring) |
| Convert string to type meta-type. More... | |
Classes for describing and printing data-types.
| enum sub_metatype |
Specializations of the core meta-types. Each enumeration is associated with a specific type_metatype. Ordering is important: The lower the number, the more specific the data-type, affecting propagation.
| enum type_metatype |
The core meta-types supported by the decompiler. These are sizeless templates for the elements making up the type algebra.
| void metatype2string | ( | type_metatype | metatype, |
| string & | res | ||
| ) |
Convert type meta-type to name.
Convert a type meta-type into the string name of the meta-type
| metatype | is the encoded type meta-type |
| res | will hold the resulting string |
References TYPE_ARRAY, TYPE_BOOL, TYPE_CODE, TYPE_FLOAT, TYPE_INT, TYPE_PARTIALSTRUCT, TYPE_PTR, TYPE_PTRREL, TYPE_SPACEBASE, TYPE_STRUCT, TYPE_UINT, TYPE_UNKNOWN, and TYPE_VOID.
Referenced by Datatype::saveXmlBasic().
| void print_data | ( | ostream & | s, |
| uint1 * | buffer, | ||
| int4 | size, | ||
| const Address & | baseaddr | ||
| ) |
Print a hex dump of a data buffer to stream.
Display an array of bytes as a hex dump at a given address. Each line displays an address and 16 bytes in hexadecimal
| s | is the stream to write to |
| buffer | is a pointer to the bytes |
| size | is the number of bytes |
| baseaddr | is the address of the first byte in the buffer |
References Address::getOffset().
Referenced by IfcDump::execute().
| type_metatype string2metatype | ( | const string & | metastring | ) |
Convert string to type meta-type.
Given a string description of a type meta-type. Return the meta-type.
| metastring | is the description of the meta-type |
References TYPE_ARRAY, TYPE_BOOL, TYPE_CODE, TYPE_FLOAT, TYPE_INT, TYPE_PARTIALSTRUCT, TYPE_PTR, TYPE_PTRREL, TYPE_SPACEBASE, TYPE_STRUCT, TYPE_UINT, TYPE_UNKNOWN, and TYPE_VOID.
Referenced by ParamEntry::restoreXml(), Datatype::restoreXmlBasic(), and TypeFactory::restoreXmlTypeNoRef().