Interactive Programming in C
nullprogram.com
nullprogram.com
"It was pointed out that I never said what F&C _is_. It's a feature for debugging your program, where you can modify your sources mid-debug-session, and the debugger will "patch" in the new code. At a very high level, the source file you're modifying is built as a shared library, gdb executes inferior function calls to load that shared library into the program, gdb finds all old versions of all functions contained in that shared library and writes trampolines in the prologues to jump to the new versions of those functions, and gdb redirects all file-static (including global) variables in that shared library to point to the statics/globals in the original executable."
The way that he is doing cross-platform code for the game is interesting. The platform layer contains main() (or WinMain() in Windows) and is rewritten for each platform. It isn't written as an abstract layer that the game calls. Instead, it sets up a buffer for one frame of video and a circular buffer for sound. Then it calls a function in the game code which is responsible for updating that. The platform code passes a pointer to the video buffer, sound buffer, playing Input (joystick/keyboard), etc. So the game code is completely portable; it is called by the platform code which is native for the actual platform. For example, the Win32 code creates the Window, handles Windows events, initializes DirectSound, and polls XInput for controller state. (It is also why this technique is possible, as they mention, the game layer does not use any external libraries and doesn't allocate its own memory using malloc.)
So, to answer your question: the way to do this, if you're doing the way they do, would be completely different between platforms (Win32 vs unix at the very least), but you don't need to implement it in a generic/abstract way that hides the operating system. They wouldn't write a framework for this. Instead, you would write it into the platform specific code in the (relatively small) platform layer.
The actual solution is much simpler (to understand and to use, I imagine) and that made me smile, nice one!
This has been used to good effect on a few spacecraft, IIRC.