README
Michael Chastain <mec@duracef.shout.net>
Sat 18 Nov 1995

Copyright 1995 Michael Chastain
Licensed under the Gnu Public License, Version 2



=== Introduction

This is mec 0.3, a trace-and-replay program.  'mec-trace' runs a target
program and traces it.  'mec-control' runs a viewer such as 'gdb' and
replays the target program so that the viewer can view it.  The viewer
sees the target program executing -exactly as when traced-.

The viewer can be any program which uses 'ptrace' and/or reads
'/proc/$pid/mem' to inspect the target.  This includes 'gdb' and
'strace'.

Trace files can be replayed on a different machine than the original.
Trace files contain all information needed to replay, including the
original executable and all shared libraries used.

No recompilation or relinking needed, for either the target program or
the viewer program.

Requires Linux 1.3.42 or later.  Supports almost all system calls.
Supports shared libraries.  Does not support ELF format, signals, or
shared memory.



=== Mailing List

Mec has a mailing list:

    mail majordomo@pobox.org.sg
    Subject: (any)
    subscribe mec-list



=== Running

export EXECER=/usr/bin/local/mec-execer	# Put execer name in env.

mec-trace date				# Trace a command
mec-control gdb x1.trace		# Replay and invoke debugger

mec-trace -o x-vi.trace vi		# Trace a command.
mec-control time x-vi.trace		# Straight replay
mec-list x-vi.trace | less		# List the trace file.

'mec-trace' runs a program and creates a trace file for it.  The trace
file contains all the information needed to replay the execution of the
target program on any machine, including copies of the original
executable file and all shared libraries used.

'mec-control' runs two inferior programs, a -viewer- program and a -replay-
program.  The viewer program is a debugger such as 'gdb' or 'strace'.
The replay program is a replay of the original traced program.

'mec-execer' is an internal program used by 'mec-control'.  Its full path
name must be stored in the environment.

'mec-list' lists a trace file.

'mec-rill' stands for 'req ioctl list lister'.  It lists all the ioctls
built into the source.
