Class PcodeDataTypeManager


  • public class PcodeDataTypeManager
    extends java.lang.Object
    Class for making Ghidra DataTypes suitable for use with pcode
    • 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 for
        size - 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