Class ProgramUtilities

  • public class ProgramUtilities
    extends java.lang.Object
    General utility class that provides convenience methods to deal with Program objects.
    • Method Detail

      • addTrackedProgram

        public static void addTrackedProgram​(Program program)
        Programs will only be stored during testing and are maintained as weak references.
        program - The program that is being tracked (all programs during testing.
      • getSystemPrograms

        public static java.util.Iterator<Program> getSystemPrograms()
        Returns an iterator for all of the Program objects in the system, which is all created programs in any state that have not been garbage collected.

        Note:The Iterator is backed by an unmodifiable set, so any attempts to modify the Iterator will throw an UnsupportedOperationException.

        an iterator for all of the programs in the system
      • parseAddress

        public static Address parseAddress​(Program program,
                                           java.lang.String addressString)
      • getByteCodeString

        public static java.lang.String getByteCodeString​(CodeUnit cu)
        Get the bytes associated with the specified code unit cu formatted as a string. Bytes will be returned as 2-digit hex separated with a space. Any undefined bytes will be represented by "??".
        cu - code unit
        formatted byte string
      • convertFunctionWrappedExternalPointer

        public static void convertFunctionWrappedExternalPointer​(Symbol functionSymbol)
        Convert old function wrapped external pointers. Migrate function to external function.