Ghidra 11.3.2
Ghidra internal decompiler documentation.
|
Classes for describing and printing data-types. More...
#include "address.hh"
Classes | |
class | ghidra::Datatype |
The base datatype class for the decompiler. More... | |
class | ghidra::TypeField |
A field within a structure or union. More... | |
struct | ghidra::DatatypeCompare |
Compare two Datatype pointers for equivalence of their description. More... | |
struct | ghidra::DatatypeNameCompare |
Compare two Datatype pointers: first by name, then by id. More... | |
class | ghidra::TypeBase |
Base class for the fundamental atomic types. More... | |
class | ghidra::TypeChar |
Base type for character data-types: i.e. char. More... | |
class | ghidra::TypeUnicode |
The unicode data-type: i.e. wchar. More... | |
class | ghidra::TypeVoid |
Formal "void" data-type object. More... | |
class | ghidra::TypePointer |
Datatype object representing a pointer. More... | |
class | ghidra::TypeArray |
Datatype object representing an array of elements. More... | |
class | ghidra::TypeEnum |
An enumerated Datatype object: an integer with named values. More... | |
class | ghidra::TypeEnum::Representation |
Class describing how a particular enumeration value is constructed using tokens. More... | |
class | ghidra::TypeStruct |
A composite Datatype object: A structure with component fields. More... | |
class | ghidra::TypeUnion |
A collection of overlapping Datatype objects: A union of component fields. More... | |
class | ghidra::TypePartialEnum |
A data-type thats holds part of a TypeEnum and possible additional padding. More... | |
class | ghidra::TypePartialStruct |
A data-type that holds part of a TypeStruct or TypeArray. More... | |
class | ghidra::TypePartialUnion |
An internal data-type for holding information about a variable's relative position within a union data-type. More... | |
class | ghidra::TypePointerRel |
Relative pointer: A pointer with a fixed offset into a specific structure or other data-type. More... | |
class | ghidra::TypeCode |
Datatype object representing executable code. More... | |
class | ghidra::TypeSpacebase |
Special Datatype object used to describe pointers that index into the symbol table. More... | |
class | ghidra::DatatypeWarning |
A data-type associated with a warning string. More... | |
class | ghidra::TypeFactory |
Container class for all Datatype objects in an Architecture. More... | |
Typedefs | |
typedef set< Datatype *, DatatypeCompare > | ghidra::DatatypeSet |
A set of data-types sorted by function. | |
typedef set< Datatype *, DatatypeNameCompare > | ghidra::DatatypeNameSet |
A set of data-types sorted by name. | |
Functions | |
void | ghidra::print_data (ostream &s, uint1 *buffer, int4 size, const Address &baseaddr) |
Print a hex dump of a data buffer to stream. | |
void | ghidra::metatype2string (type_metatype metatype, string &res) |
Convert type meta-type to name. | |
type_metatype | ghidra::string2metatype (const string &metastring) |
Convert string to type meta-type. | |
type_class | ghidra::string2typeclass (const string &classstring) |
Convert a string to a data-type class. | |
type_class | ghidra::metatype2typeclass (type_metatype meta) |
Convert a data-type metatype to a data-type class. | |
Classes for describing and printing data-types.
enum ghidra::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 ghidra::type_class |
Data-type classes for the purpose of assigning storage.
Enumerator | |
---|---|
TYPECLASS_GENERAL | General purpose. |
TYPECLASS_FLOAT | Floating-point data-types. |
TYPECLASS_PTR | Pointer data-types. |
TYPECLASS_HIDDENRET | Class for hidden return values. |
TYPECLASS_VECTOR | Vector data-types. |
TYPECLASS_CLASS1 | Architecture specific class 1. |
TYPECLASS_CLASS2 | Architecture specific class 2. |
TYPECLASS_CLASS3 | Architecture specific class 3. |
TYPECLASS_CLASS4 | Architecture specific class 4. |
The core meta-types supported by the decompiler. These are sizeless templates for the elements making up the type algebra. Index is important for Datatype::base2sub array.
void ghidra::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 |
type_class ghidra::metatype2typeclass | ( | type_metatype | meta | ) |
Convert a data-type metatype to a data-type class.
Assign the basic storage class based on a metatype:
Everything else returns the general purpose TYPECLASS_GENERAL
meta | is the metatype |
void ghidra::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 |
type_metatype ghidra::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 |
type_class ghidra::string2typeclass | ( | const string & | classstring | ) |
Convert a string to a data-type class.
Given a description of a data-type class, return the type_class.
classstring | is the description of the class |