Christophe Weblog Wiki Code Publications Music
rework to support sldb
authorChristophe Rhodes <csr21@cantab.net>
Fri, 13 Aug 2010 10:49:48 +0000 (11:49 +0100)
committerChristophe Rhodes <csr21@cantab.net>
Fri, 13 Aug 2010 10:49:48 +0000 (11:49 +0100)
commite64beb72d7b60d390ab8e2c0f6029dfede60877d
treef9d2fea0bdb9b343a393cec56686cf2aa43eaa18
parent76be998be0ba28137585ebe6cb738cd67dd43e67
rework to support sldb

R doesn't have much in the way of dynamic binding; you can fake it by
messing with environments, but that's not fun.

So instead, pass around the connection (`io') and an object
representing the SLDB state (`sldbState') to all functions.
Poor-man's explicit continuation-passing-style...

We need to call some of the mainLoop internal functions from elsewhere
now, so make them not-internal any more.

Fix ridiculous thinko in the logical branch of writeSexpToString

use simpleCondition rather than simpleError in swank:throw-to-toplevel

implement swank:debugger-info-for-emacs

Now `q' in sldb (sldb-quit) works.  Things that don't work:
1. the backtrace is the wrong way up.
2. calling any restarts
3. frame locals
4. returning from frames (dunno if R actually supports this)
5. zoom to source
6. probably other things
swank.R