Installing and using the code - endplay/omniplay GitHub Wiki

Table of Contents

About

Omniplay is our replay system. Omniplay consists of a custom Linux kernel and glibc.

Setting up & building omniplay

Learn about setting up and checking out the Omniplay Repository.

Information on devloping for the replay system can be found in Hacking Omniplay.

Some programs require Special Build/Run Instructions.

Learn about how to use deterministic x proxy Instructions on x proxy.

Instructions for the pausing tool Pausing tool

Instruction for using gdb with replays Running GDB

Pragmatically recording/replaying

The Omniplay repository contains a python wrapper library, allowing users to write scripts which can automate the act of recording and replaying processes.

To record a process make a python script:

    env = omniplay.OmniplayEnvironment()
    
    ckpt = env.record('echo "Hello World"')
    
    print "Recorded 'echo' into record group: " + str(ckpt.group_id)

To replay the last recorded echo:

    env = omniplay.OmniplayEnvironment()
    
    logdb = omniplay.logdb.ReplayLogDB(env)
    
    logdb.updatedb()
    
    group_id = logdb.get_most_recent_replay("echo")
    rec_dir = env.get_record_dir(group_id)
    env.replay(rec_dir)

To attach a pin tool (the io.so tool):

    env = omniplay.OmniplayEnvironment()
    
    logdb = omniplay.logdb.ReplayLogDB(env)
    
    logdb.updatedb()
    
    group_id = logdb.get_most_recent_replay("echo")
    rec_dir = env.get_record_dir(group_id)
    env.run_tool(rec_dir, "io.so")

More information about the omniplay module may be found with "pydoc (omniplay|omniplay.env|omniplay.logdb|omniplay.parseklog)". The module code is found in $OMNIPLAY_DIR/python_environ/omniplay/.

Bash prompt

If you want your bash prompt to show that you're currently recording, add this to your .bashrc

  if [[ ! -z $OMNIPLAY_DIR ]]; then
          source $OMNIPLAY_DIR/scripts/common.sh
  
          is_record_proc || {
          export PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \[\e[1;31m\](Record)\[\033[01;34m\] \w \$\[\033[00m\] '
  }
  fi
⚠️ **GitHub.com Fallback** ⚠️