import simuvex

class UserHook(simuvex.SimProcedure):
    NO_RET = True

    # pylint: disable=arguments-differ
    def run(self, user_func=None, user_kwargs=None, default_return_addr=None):
        result = user_func(self.state, **user_kwargs)
        if result is None:
            self.add_successor(self.state, default_return_addr, self.state.se.true, 'Ijk_NoHook')
        else:
            for state in result:
                self.add_successor(state, state.ip, state.scratch.guard, state.scratch.jumpkind)

import simuvex

class UserHook(simuvex.SimProcedure):
    NO_RET = True

    # pylint: disable=arguments-differ
    def run(self, user_func=None, user_kwargs=None, default_return_addr=None, length=None):
        result = user_func(self.state, **user_kwargs)
        if result is None:
            self.add_successor(self.state, default_return_addr, self.state.se.true, 'Ijk_NoHook')
        else:
            for state in result:
                self.add_successor(state, state.ip, state.scratch.guard, state.scratch.jumpkind)

Make the userhook take the length arg b/c why not
Make the userhook take the length arg b/c why not

  import simuvex
  
  class UserHook(simuvex.SimProcedure):
      NO_RET = True
  
      # pylint: disable=arguments-differ
-     def run(self, user_func=None, user_kwargs=None, default_return_addr=None):
+     def run(self, user_func=None, user_kwargs=None, default_return_addr=None, length=None):
          result = user_func(self.state, **user_kwargs)
          if result is None:
              self.add_successor(self.state, default_return_addr, self.state.se.true, 'Ijk_NoHook')
          else:
              for state in result:
                  self.add_successor(state, state.ip, state.scratch.guard, state.scratch.jumpkind)
  
Make the userhook take the length arg b/c why not
## Code Before:
import simuvex

class UserHook(simuvex.SimProcedure):
    NO_RET = True

    # pylint: disable=arguments-differ
    def run(self, user_func=None, user_kwargs=None, default_return_addr=None):
        result = user_func(self.state, **user_kwargs)
        if result is None:
            self.add_successor(self.state, default_return_addr, self.state.se.true, 'Ijk_NoHook')
        else:
            for state in result:
                self.add_successor(state, state.ip, state.scratch.guard, state.scratch.jumpkind)

## Instruction:
Make the userhook take the length arg b/c why not
## Code After:
import simuvex

class UserHook(simuvex.SimProcedure):
    NO_RET = True

    # pylint: disable=arguments-differ
    def run(self, user_func=None, user_kwargs=None, default_return_addr=None, length=None):
        result = user_func(self.state, **user_kwargs)
        if result is None:
            self.add_successor(self.state, default_return_addr, self.state.se.true, 'Ijk_NoHook')
        else:
            for state in result:
                self.add_successor(state, state.ip, state.scratch.guard, state.scratch.jumpkind)
