From 2d372ae85cf0f1eacb4c44e3615499e0a29bf6b6 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Wed, 25 Aug 2010 18:14:38 +0100 Subject: [PATCH] implement swank:frame-source-location Now v in the debugger mostly works. --- swank.R | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 } -- 2.30.2