Wiki

Clone wiki

pymoult / stack

#Stack manipulation

The lowlevel.stack module provides tools for manipulating the stack.

  • resetThread(thread) causes the reboot of thread.
  • switchMain(thread,function,args) replaces the main function of thread with function. That function can take arguments. If so, the arguments args will be given to it.
  • suspendThread(thread) suspends thread if is not already suspended.
  • resumeThread(thread) resumes thread if it is suspended.
  • rebootFunction(thread,function,new_function,capture_state) will force function to return in thread. Its frame will be extract and given to capture_state for extracting the arguments to give to new_function. new_function will be called after function has returned.

Updated