If you're on Windows, an old project of mine has a more sophisticated take on this:<p><a href="https://github.com/kevingadd/shootblues" rel="nofollow">https://github.com/kevingadd/shootblues</a><p>You can inject a whole collection of scripts into one or more processes hosting a Python interpreter, load/unload scripts at runtime, and communicate between host processes via an RPC mechanism.<p>The only interesting use for it I ever came up with was modding the EVE Online user interface. There are a bunch of scripts that use it at <a href="https://github.com/kevingadd/shootbluesscripts" rel="nofollow">https://github.com/kevingadd/shootbluesscripts</a> - some of them are kind of interesting, like a gateway that lets you interact with scripts via Jabber messages, and a HTML5 remote desktop that lets you play the game from a remote browser.
That's pretty wild. Obviously you can do similar with straight up gdb and C programs, but does this sort of thing exist with other languages? I'd be fairly interested in something like this for racket and ruby.
This looks like a great little trick, but I can't get it to work on OS X Lion. Has anyone else on Lion gotten this to work?<p>I've got Xcode 4.1 installed with dev tools, and it seems like the version of gdb provided doesn't support the -eval-command flag which breaks the script.<p>I'm wondering if someone else can confirm this problem, and whether there is an easy way to to install a supported version of gdb.