From: Christophe Rhodes Date: Wed, 25 Aug 2010 17:14:38 +0000 (+0100) Subject: implement swank:frame-source-location X-Git-Url: http://christophe.rhodes.io/gitweb/?a=commitdiff_plain;h=2d372ae85cf0f1eacb4c44e3615499e0a29bf6b6;p=swankr.git implement swank:frame-source-location Now v in the debugger mostly works. --- diff --git a/swank.R b/swank.R index 0684ab0..f395217 100644 --- a/swank.R +++ b/swank.R @@ -284,6 +284,21 @@ computeRestartsForEmacs <- function (sldbState) { } } +`swank:frame-source-location` <- function(io, sldbState, n) { + call <- sldbState$calls[[n+1]] + srcref <- attr(call, "srcref") + srcfile <- attr(srcref, "srcfile") + if(is.null(srcfile)) { + list(quote(`:error`), "no srcfile") + } else { + filename <- get("filename", srcfile) + list(quote(`:location`), + list(quote(`:file`), filename), + list(quote(`:line`), srcref[[1]], srcref[[2]]-1), + FALSE) + } +} + `swank:buffer-first-change` <- function(io, sldbState, filename) { FALSE }