Package ghidra.program.model.pcode
Class PcodeDataTypeManager
- java.lang.Object
-
- ghidra.program.model.pcode.PcodeDataTypeManager
-
public class PcodeDataTypeManager extends java.lang.ObjectClass for making Ghidra DataTypes suitable for use with pcode
-
-
Constructor Summary
Constructors Constructor Description PcodeDataTypeManager(Program prog)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringbuildCoreTypes()Build the coretypes xml elementjava.lang.StringBuilderbuildStructTypeZeroSizeOveride(DataType type)Build an XML document string representing the Structure or Typedef to Structure that has its size reported as zero.java.lang.StringBuilderbuildType(DataType type, int size)Build an XML document string representing the type information for a data typejava.lang.StringBuilderbuildTypeRef(DataType type, int size)DataTypefindBaseType(java.lang.String nm, java.lang.String idstr)Find a data type with the given name.DataTypefindUndefined(int size)ProgramgetProgram()DataTypereadXMLDataType(XmlPullParser parser)Get the data type that corresponds to the given XML element.
-
-
-
Constructor Detail
-
PcodeDataTypeManager
public PcodeDataTypeManager(Program prog)
-
-
Method Detail
-
getProgram
public Program getProgram()
-
findUndefined
public DataType findUndefined(int size)
-
findBaseType
public DataType findBaseType(java.lang.String nm, java.lang.String idstr)
Find a data type with the given name.- Parameters:
nm- name of data type- Returns:
- may return null if no data type exists with the given name
-
readXMLDataType
public DataType readXMLDataType(XmlPullParser parser) throws PcodeXMLException
Get the data type that corresponds to the given XML element.- Parameters:
el- element- Returns:
- data type
- Throws:
PcodeXMLException- if the data type could be resolved from the element
-
buildTypeRef
public java.lang.StringBuilder buildTypeRef(DataType type, int size)
- Parameters:
type- to be converted- Returns:
- either a typeref tag giving the name, or a full type tag
-
buildType
public java.lang.StringBuilder buildType(DataType type, int size)
Build an XML document string representing the type information for a data type- Parameters:
type- data type to build XML forsize- size of the data type- Returns:
- XML string document
-
buildStructTypeZeroSizeOveride
public java.lang.StringBuilder buildStructTypeZeroSizeOveride(DataType type)
Build an XML document string representing the Structure or Typedef to Structure that has its size reported as zero.- Parameters:
type- data type to build XML for- Returns:
- XML string document
-
buildCoreTypes
public java.lang.String buildCoreTypes()
Build the coretypes xml element- Returns:
- coretypes xml element
-
-