Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Latest commit

 

History

History
51 lines (34 loc) · 1.2 KB

README.md

File metadata and controls

51 lines (34 loc) · 1.2 KB

mttn

memory tracer, take N

Build Status


mttn is a small, very slow program tracer with a few specific goals:

  • Not modifying the program's instruction stream.
  • Faithfully recording most memory accesses.
  • Generating traces that are suitable for SIEVE's Tiny86.

Strong anti-goals:

  • Being fast.

Weak anti-goals:

  • Supporting memory accesses that are either variable-sized or larger than 64 bits.

Building and use

mttn uses Linux-specific ptrace APIs and syscalls, so you'll need to run it on a relatively recent Linux kernel. If you're on another platform, you can use the Dockerfile:

$ docker build . -t mttn
$ docker run --rm -it --cap-add=SYS_PTRACE -v $(pwd):/app/mttn mttn
$ # in docker
$ cd /app/mttn

Once you have the appropriate environment, just cargo build:

$ cargo build
$ ./target/debug/mttn -h

Testing

mttn's tests require some system depedencies to build test binaries with: nasm, (GNU) ld, and (GNU) make.

Once you have those installed, running the tests should be as simple as:

$ cargo test