Class AbstractProgramContext

    • Field Detail

      • baseContextRegister

        protected Register baseContextRegister
      • defaultDisassemblyContext

        protected RegisterValue defaultDisassemblyContext
    • Constructor Detail

      • AbstractProgramContext

        protected AbstractProgramContext​(Language language)
    • Method Detail

      • getLanguage

        public Language getLanguage()
        Get underlying language associated with this context and its registers
        Returns:
        language
      • hasNonFlowingContext

        public final boolean hasNonFlowingContext()
        Specified by:
        hasNonFlowingContext in interface ProgramContext
        Returns:
        true if one or more non-flowing context registers fields have been defined within the base processor context register.
      • getFlowValue

        public final RegisterValue getFlowValue​(RegisterValue value)
        Modify register value to eliminate non-flowing bits
        Specified by:
        getFlowValue in interface ProgramContext
        Parameters:
        value - context register value to be modified
        Returns:
        value suitable for flowing
      • getNonFlowValue

        public final RegisterValue getNonFlowValue​(RegisterValue value)
        Modify register value to only include non-flowing bits
        Specified by:
        getNonFlowValue in interface ProgramContext
        Parameters:
        value - context register value to be modified
        Returns:
        new value or null if value does not correspond to a context register or non-flowing context fields have not been defined
      • init

        protected void init​(Language lang)
        Initialize context for the specified language
        Parameters:
        lang - processor language for which this context applies
      • getContextRegisters

        public final java.util.List<Register> getContextRegisters()
        Description copied from interface: ProgramContext
        Gets the registers for this context that are used for processor context states.
        Specified by:
        getContextRegisters in interface ProgramContext
        Returns:
        all processor context registers
      • getRegister

        public final Register getRegister​(java.lang.String name)
        Description copied from interface: ProgramContext
        Get a Register object given the name of a register
        Specified by:
        getRegister in interface ProgramContext
        Parameters:
        name - the name of the register.
        Returns:
        The register with the given name or null if no register has that name.
      • getRegisterNames

        public final java.util.List<java.lang.String> getRegisterNames()
        Description copied from interface: ProgramContext
        Get an alphabetical sorted unmodifiable list of original register names (including context registers). Names correspond to orignal register name and not aliases which may be defined.
        Specified by:
        getRegisterNames in interface ProgramContext
        Returns:
        alphabetical sorted unmodifiable list of original register names.
      • getRegisters

        public final java.util.List<Register> getRegisters()
        Description copied from interface: ProgramContext
        Get all the register descriptions defined for this program context.
        Specified by:
        getRegisters in interface ProgramContext
        Returns:
        unmodifiable list of defined register descriptions
      • setDefaultDisassemblyContext

        public final void setDefaultDisassemblyContext​(RegisterValue value)
        Description copied from interface: ProgramContext
        Set the initial disassembly context to be used when initiating disassmbly
        Specified by:
        setDefaultDisassemblyContext in interface ProgramContext
        Parameters:
        value - context register value