Projects Jams Discord News
Resources
Unwind Fishbowls Forums
About
Manifesto Our values About
Log In

How to Record & Replay Native Programs

leddoo December 1, 2025

A whirlwind introduction to the challenges of recording native code and how to overcome them.

Introduction

Like any good idea in computer science, record & replay debugging dates back to the 1960s. Robert Balzer's Extendable Debugging and Monitoring System (EXDAMS) is quoted as the earliest system to implement the idea. EXDAMS worked by capturing dynamic events like function calls, branches, and variable assignments to a history tape. Replay could then restore any program state by applying the deltas from the tape.

Nowadays, with millions of function calls and billions of variable assignments per second, such an approach would clearly be infeasible. That's why modern implementations are based on one key insight: Computers are (mostly) deterministic. If you save which program you executed and what inputs you passed to it, it will (mostly) perform the same function calls and variable assignments again i

Read more

Generating 30 kloc of Asm for Fun and Profit

leddoo October 28, 2025

I rewrote my AArch64 interpreter in raw assembly. Here's why and how I did it:

Introduction

As I've mentioned in the previous article, my time travel debugger is based on an interpreter for AArch64 native code. The primary motivation for this is to be able to reliably record the side effects of non-deterministic instructions and of system calls. There are other ways to do this besides using an interpreter, each with their own pros and cons. For the sake of this article though, we'll just assume that using an interpreter (accelerated with a JIT) is a good idea.

But I'll tell you what is not a good idea: Writing said interpreter in Rust. That's what I did originally, and it worked for a while, until it didn't.

Floating Point Troubles

The original idea behind writing the interpreter in a high level programming language was to be able to run it on other platforms like x86 for "cross-arch re

Read more

The first 1.5 Years

leddoo October 22, 2025

This article is about the first 1.5 years of work on my time travel debugger.

Introduction

The story begins on february 23rd 2023, when d7 posted a link to the tomorrow corp tech demo in the handmade network general channel. The video was truly a mind expanding experience. They showcased a tool that allowed you to scrub through recordings of someone playing their game as if it was a video. But these "recordings" didn't just contain screen captures, no, they contained "the entire execution of the game". You could select any point in time, and their tool would reconstruct the entire game state at that point, including the function callstack, local variables, and the partial draw state of the window. You could single step through the renderer code and see game objects appear on screen like in renderdoc.

And you could do something that was impossible in every other debugger that I had seen so far: you could step bac

Read more