(self, irsb: IRSB)
Execute a single IRSB.

        :param irsb: Block to be executed.
Execute a single IRSB.
Execute a single IRSB .
def handle_pcode_block(self, irsb: IRSB) -> None:
        """
        Execute a single IRSB.

        :param irsb: Block to be executed.
        """
        self.irsb = irsb
        # Hack on a handler here to track whether exit has been handled or not
        # FIXME: Vex models this as a known exit statement, which we should also
        # do here. For now, handle it this way.
        self.state.scratch.exit_handled = False

        fallthru_addr = None
        for i, ins in enumerate(irsb._instructions):
            l.debug("Executing machine instruction @ %#x (%d of %d)", ins.address.offset, i+1, len(irsb._instructions))

            # Execute a single instruction of the emulated machine
            self._current_ins = ins
            self.state.scratch.ins_addr = self._current_ins.address.offset

            # FIXME: Hacking this on here but ideally should use "scratch".
            self._pcode_tmps = {}  # FIXME: Consider alignment requirements

            for op in self._current_ins.ops:
                self._current_op = op
                self._current_behavior = irsb.behaviors.get_behavior_for_opcode(self._current_op.opcode)
                l.debug("Executing p-code op: %s", self._current_op)
                self._execute_current_op()

            self._current_op = None
            self._current_behavior = None
            fallthru_addr = ins.address.offset + ins.length

        if not self.state.scratch.exit_handled:
            self.successors.add_successor(
                self.state,
                fallthru_addr,
                self.state.scratch.guard,
                "Ijk_Boring",
                exit_stmt_idx=DEFAULT_STATEMENT,
                exit_ins_addr=self.state.scratch.ins_addr,
            )
def handle_pcode_block ( self , irsb : IRSB ) -> None : self . irsb = irsb # Hack on a handler here to track whether exit has been handled or not # FIXME: Vex models this as a known exit statement, which we should also # do here. For now, handle it this way. self . state . scratch . exit_handled = False fallthru_addr = None for i , ins in enumerate ( irsb . _instructions ) : l . debug ( "Executing machine instruction @ %#x (%d of %d)" , ins . address . offset , i + 1 , len ( irsb . _instructions ) ) # Execute a single instruction of the emulated machine self . _current_ins = ins self . state . scratch . ins_addr = self . _current_ins . address . offset # FIXME: Hacking this on here but ideally should use "scratch". self . _pcode_tmps = { } # FIXME: Consider alignment requirements for op in self . _current_ins . ops : self . _current_op = op self . _current_behavior = irsb . behaviors . get_behavior_for_opcode ( self . _current_op . opcode ) l . debug ( "Executing p-code op: %s" , self . _current_op ) self . _execute_current_op ( ) self . _current_op = None self . _current_behavior = None fallthru_addr = ins . address . offset + ins . length if not self . state . scratch . exit_handled : self . successors . add_successor ( self . state , fallthru_addr , self . state . scratch . guard , "Ijk_Boring" , exit_stmt_idx = DEFAULT_STATEMENT , exit_ins_addr = self . state . scratch . ins_addr , )