[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master e554cad 027/215: Add trepanjs
From: |
Rocky Bernstein |
Subject: |
[elpa] master e554cad 027/215: Add trepanjs |
Date: |
Sat, 30 Jul 2016 14:48:49 +0000 (UTC) |
branch: master
commit e554cadbac198ccd1bbf7cd523748e66e2d11a12
Author: rocky <address@hidden>
Commit: rocky <address@hidden>
Add trepanjs
---
configure.ac | 1 +
realgud.el | 2 +
realgud/debugger/Makefile.am | 2 +-
realgud/debugger/nodejs/init.el | 2 +
realgud/debugger/trepanjs/Makefile.am | 1 +
realgud/debugger/trepanjs/backtrack-mode.el | 81 +++++++++++++
realgud/debugger/trepanjs/core.el | 170 +++++++++++++++++++++++++++
realgud/debugger/trepanjs/init.el | 121 +++++++++++++++++++
realgud/debugger/trepanjs/track-mode.el | 82 +++++++++++++
realgud/debugger/trepanjs/trepanjs.el | 58 +++++++++
10 files changed, 519 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 4e46155..0feab78 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,6 +80,7 @@ AC_CONFIG_FILES([Makefile \
realgud/debugger/trepan2/Makefile \
realgud/debugger/trepan3k/Makefile \
realgud/debugger/trepan.pl/Makefile \
+ realgud/debugger/trepanjs/Makefile \
realgud/debugger/trepanx/Makefile \
realgud/debugger/trepan8/Makefile \
realgud/debugger/zshdb/Makefile \
diff --git a/realgud.el b/realgud.el
index e73320c..7eb8146 100644
--- a/realgud.el
+++ b/realgud.el
@@ -65,6 +65,7 @@
;; remake remake GNU Make
;; ruby-debug rdebug Ruby
;; trepanning trepan trepanning debugger for a patched Ruby 1.9
+;; trepanjs trepanjs trepanning debugger for node.js and V8
;; trepan2 trepan2 trepanning debugger for Python 2.x
;; trepan3k trepan3k trepanning debugger for Python 3.x
;; zshdb zshdb Zsh
@@ -119,6 +120,7 @@
"./realgud/debugger/rdebug/rdebug"
"./realgud/debugger/remake/remake"
"./realgud/debugger/trepan/trepan"
+ "./realgud/debugger/trepanjs/trepanjs"
"./realgud/debugger/trepan.pl/trepanpl"
"./realgud/debugger/trepan2/trepan2"
"./realgud/debugger/trepan3k/trepan3k"
diff --git a/realgud/debugger/Makefile.am b/realgud/debugger/Makefile.am
index 89ef7d9..69ae438 100644
--- a/realgud/debugger/Makefile.am
+++ b/realgud/debugger/Makefile.am
@@ -1,7 +1,7 @@
SUBDIRS = \
bashdb gdb gub jdb kshdb nodejs \
pdb perldb pydb pydbgr rdebug remake \
- trepan trepan2 trepan3k trepan.pl trepanx trepan8 \
+ trepan trepan2 trepan3k trepan.pl trepanjs trepanx trepan8 \
zshdb
EXTRA_DIST = common.mk
diff --git a/realgud/debugger/nodejs/init.el b/realgud/debugger/nodejs/init.el
index 25c7e27..2fe088e 100644
--- a/realgud/debugger/nodejs/init.el
+++ b/realgud/debugger/nodejs/init.el
@@ -139,6 +139,8 @@ realgud-loc-pat struct")
(setf (gethash "nodejs" realgud-command-hash realgud:nodejs-command-hash))
(setf (gethash "backtrace" realgud:nodejs-command-hash) "T")
+(setf (gethash "break" realgud:trepanjs-command-hash)
+ "setBreakpoint(%l)")
(setf (gethash "continue" realgud:nodejs-command-hash) "cont")
(setf (gethash "quit" realgud:nodejs-command-hash) "quit")
(setf (gethash "finish" realgud:nodejs-command-hash) "out")
diff --git a/realgud/debugger/trepanjs/Makefile.am
b/realgud/debugger/trepanjs/Makefile.am
new file mode 100644
index 0000000..9a343a5
--- /dev/null
+++ b/realgud/debugger/trepanjs/Makefile.am
@@ -0,0 +1 @@
+include $(srcdir)/../common.mk
diff --git a/realgud/debugger/trepanjs/backtrack-mode.el
b/realgud/debugger/trepanjs/backtrack-mode.el
new file mode 100644
index 0000000..32ee7e7
--- /dev/null
+++ b/realgud/debugger/trepanjs/backtrack-mode.el
@@ -0,0 +1,81 @@
+;; Copyright (C) 2015 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Mode for parsing various kinds of backtraces found in Ruby
+
+(eval-when-compile (require 'cl))
+(require 'load-relative)
+(require-relative-list '(
+ "../../common/cmds"
+ "../../common/menu"
+ "../../common/track-mode"
+ "../../common/backtrack-mode"
+ )
+ "realgud-")
+(require-relative-list '("core" "init") "realgud:trepanjs-")
+(require-relative-list '("../../lang/ruby") "realgud-lang-")
+
+(realgud-backtrack-mode-vars "trepanjs")
+(set-keymap-parent trepanjs-backtrack-mode-map realgud-backtrack-mode-map)
+
+(declare-function realgud-backtrack-mode
'realgud-common-backtrack-mode)
+(declare-function realgud-backtrack-set-debugger
'realgud-common-backtrack-mode)
+(declare-function realgud-goto-line-for-pt
'realgud-common-backtrack-mode)
+(declare-function realgud:ruby-populate-command-keys 'realgud-lang-ruby)
+
+(defun realgud:trepanjs-goto-control-frame-line (pt)
+ "Display the location mentioned by a control-frame line
+described by PT."
+ (interactive "d")
+ (realgud-goto-line-for-pt pt "control-frame"))
+
+(realgud:ruby-populate-command-keys trepanjs-backtrack-mode-map)
+(define-key trepanjs-backtrack-mode-map
+ (kbd "C-c !c") 'realgud:trepanjs-goto-control-frame-line)
+
+(define-minor-mode trepanjs-backtrack-mode
+ "Minor mode for tracking ruby debugging inside a file which may not have
process shell.
+
+\\{trepanjs-backtrack-mode-map}
+"
+ :init-value nil
+ ;; :lighter " trepanjs" ;; mode-line indicator from realgud-track is
sufficient.
+ ;; The minor mode bindings.
+ :global nil
+ :group 'realgud:trepanjs
+ :keymap trepanjs-backtrack-mode-map
+
+ (realgud-backtrack-set-debugger "trepanjs")
+ (if trepanjs-backtrack-mode
+ (progn
+ (realgud-backtrack-mode 't)
+ (run-mode-hooks (intern (trepanjs-backtrack-mode-hook))))
+ (progn
+ (realgud-backtrack-mode nil)
+ ))
+)
+
+(defun trepanjs-backtrack-mode-hook()
+ (if trepanjs-backtrack-mode
+ (progn
+ (use-local-map trepanjs-backtrack-mode-map)
+ (message "using trepanjs mode map")
+ )
+ (message "trepanjs backtrack-mode-hook disable called"))
+)
+
+(provide-me "realgud:trepanjs-")
diff --git a/realgud/debugger/trepanjs/core.el
b/realgud/debugger/trepanjs/core.el
new file mode 100644
index 0000000..09482e3
--- /dev/null
+++ b/realgud/debugger/trepanjs/core.el
@@ -0,0 +1,170 @@
+;; Copyright (C) 2015 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+(eval-when-compile (require 'cl))
+
+(require 'load-relative)
+(require-relative-list '("../../common/track"
+ "../../common/core"
+ "../../common/lang")
+ "realgud-")
+(require-relative-list '("init") "realgud:trepanjs-")
+
+(declare-function realgud:expand-file-name-if-exists 'realgud-core)
+(declare-function realgud-parse-command-arg 'realgud-core)
+(declare-function realgud-query-cmdline 'realgud-core)
+(declare-function realgud-suggest-invocation 'realgud-core)
+
+;; FIXME: I think the following could be generalized and moved to
+;; realgud-... probably via a macro.
+(defvar realgud:trepanjs-minibuffer-history nil
+ "minibuffer history list for the command `realgud:trepanjs'.")
+
+(easy-mmode-defmap realgud:trepanjs-minibuffer-local-map
+ '(("\C-i" . comint-dynamic-complete-filename))
+ "Keymap for minibuffer prompting of trepanjs startup command."
+ :inherit minibuffer-local-map)
+
+;; FIXME: I think this code and the keymaps and history
+;; variable chould be generalized, perhaps via a macro.
+(defun realgud:trepanjs-query-cmdline (&optional opt-debugger)
+ (realgud-query-cmdline
+ 'realgud:trepanjs-suggest-invocation
+ realgud:trepanjs-minibuffer-local-map
+ 'realgud:trepanjs-minibuffer-history
+ opt-debugger))
+
+(defun realgud:trepanjs-parse-cmd-args (orig-args)
+ "Parse command line ARGS for the annotate level and name of script to debug.
+
+ORIG-ARGS should contain a tokenized list of the command line to run.
+
+We return the a list containing
+* the name of the debugger given (e.g. trepanjs) and its arguments - a list of
strings
+* the script name and its arguments - list of strings
+* whether the annotate or emacs option was given ('-A', '--annotate' or
'--emacs) - a boolean
+
+For example for the following input:
+ (map 'list 'symbol-name
+ '(node --interactive --debugger-port 5858 /tmp trepanjs ./gcd.js a b))
+
+we might return:
+ ((\"node\" \"--interactive\" \"--debugger-port\" \"5858\") nil
(\"/tmp/gcd.js\" \"a\" \"b\"))
+
+Note that path elements have been expanded via `expand-file-name'.
+"
+
+ ;; Parse the following kind of pattern:
+ ;; node trepanjs-options script-name script-options
+ (let (
+ (args orig-args)
+ (pair) ;; temp return from
+ (node-two-args '("-debugger_port" "C" "D" "i" "l" "m" "-module" "x"))
+ ;; node doesn't have any optional two-arg options
+ (node-opt-two-args '())
+
+ ;; One dash is added automatically to the below, so
+ ;; h is really -h and -debugger_port is really --debugger_port.
+ (trepanjs-two-args '("-debugger_port"))
+ (trepanjs-opt-two-args '())
+
+ ;; Things returned
+ (script-name nil)
+ (debugger-name nil)
+ (interpreter-args '())
+ (script-args '())
+ )
+ (if (not (and args))
+ ;; Got nothing: return '(nil, nil, nil)
+ (list interpreter-args nil script-args)
+ ;; else
+ (progn
+ ;; Remove "trepanjs" (or "nodemon" or "node") from invocation like:
+ ;; trepanjs --trepanjs-options script --script-options
+ (setq debugger-name (file-name-sans-extension
+ (file-name-nondirectory (car args))))
+ (unless (string-match "^node\\(?:js\\|mon\\)$" debugger-name)
+ (message
+ "Expecting debugger name `%s' to be `node', `nodemon', or `trepanjs'"
+ debugger-name))
+ (setq interpreter-args (list (pop args)))
+
+ ;; Skip to the first non-option argument.
+ (while (and args (not script-name))
+ (let ((arg (car args)))
+ (cond
+ ((equal "debug" arg)
+ (nconc interpreter-args (list arg))
+ (setq args (cdr args))
+ )
+
+ ;; Options with arguments.
+ ((string-match "^-" arg)
+ (setq pair (realgud-parse-command-arg
+ args trepanjs-two-args trepanjs-opt-two-args))
+ (nconc interpreter-args (car pair))
+ (setq args (cadr pair)))
+ ;; Anything else must be the script to debug.
+ (t (setq script-name (realgud:expand-file-name-if-exists arg))
+ (setq script-args (cons script-name (cdr args))))
+ )))
+ (list interpreter-args nil script-args)))
+ ))
+
+;; To silence Warning: reference to free variable
+(defvar realgud:trepanjs-command-name)
+
+(defun realgud:trepanjs-suggest-invocation (debugger-name)
+ "Suggest a trepanjs command invocation via `realgud-suggest-invocaton'"
+ (realgud-suggest-invocation realgud:trepanjs-command-name
+ realgud:trepanjs-minibuffer-history
+ "js" "\\.js$"))
+
+(defun realgud:trepanjs-remove-ansi-shmutz()
+ "Remove ASCII escape sequences that node.js 'decorates' in
+prompts and interactive output with"
+ (add-to-list
+ 'comint-preoutput-filter-functions
+ (lambda (output)
+ (replace-regexp-in-string "\033\\[[0-9]+[GKJ]" "" output)))
+ )
+
+(defun realgud:trepanjs-reset ()
+ "Trepanjs cleanup - remove debugger's internal buffers (frame,
+breakpoints, etc.)."
+ (interactive)
+ ;; (trepanjs-breakpoint-remove-all-icons)
+ (dolist (buffer (buffer-list))
+ (when (string-match "\\*trepanjs-[a-z]+\\*" (buffer-name buffer))
+ (let ((w (get-buffer-window buffer)))
+ (when w
+ (delete-window w)))
+ (kill-buffer buffer))))
+
+;; (defun trepanjs-reset-keymaps()
+;; "This unbinds the special debugger keys of the source buffers."
+;; (interactive)
+;; (setcdr (assq 'trepanjs-debugger-support-minor-mode minor-mode-map-alist)
+;; trepanjs-debugger-support-minor-mode-map-when-deactive))
+
+
+(defun realgud:trepanjs-customize ()
+ "Use `customize' to edit the settings of the `trepanjs' debugger."
+ (interactive)
+ (customize-group 'realgud:trepanjs))
+
+(provide-me "realgud:trepanjs-")
diff --git a/realgud/debugger/trepanjs/init.el
b/realgud/debugger/trepanjs/init.el
new file mode 100644
index 0000000..f1eec60
--- /dev/null
+++ b/realgud/debugger/trepanjs/init.el
@@ -0,0 +1,121 @@
+;; Copyright (C) 2015 Free Software Foundation, Inc
+
+;; Author: Rocky Bernstein <address@hidden>
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+;;; Regular expressions for nodejs Javascript debugger.
+
+(eval-when-compile (require 'cl))
+
+(require 'load-relative)
+(require-relative-list '("../../common/regexp"
+ "../../common/loc"
+ "../../common/init")
+ "realgud-")
+(require-relative-list '("../../lang/posix-shell") "realgud-lang-")
+
+(defvar realgud:trepanjs-pat-hash (make-hash-table :test 'equal)
+ "Hash key is the what kind of pattern we want to match:
+backtrace, prompt, etc. The values of a hash entry is a
+realgud-loc-pat struct")
+
+(declare-function make-realgud-loc-pat (realgud-loc))
+
+(defconst realgud:trepanjs-term-escape "[[0-9]+[GKJ]"
+ "Escape sequence regular expression pattern trepanjs often puts
+ in around prompts")
+
+(defconst realgud:nodejs-frame-start-regexp "\\(?:^\\|\n\\)\\(?:#\\)")
+(defconst realgud:nodejs-frame-num-regexp "\\([0-9]+\\)")
+(defconst realgud:nodejs-frame-module-regexp "[^ \t\n]+")
+(defconst realgud:nodejs-frame-file-regexp "[^ \t\n]+")
+(defconst realgud:nodejs-frame-line-regexp realgud:nodejs-frame-num-regexp)
+(defconst realgud:nodejs-frame-column-regexp realgud:nodejs-frame-num-regexp)
+
+;; Regular expression that describes a trepanjs location generally shown
+;; before a command prompt.
+;; For example:
+;; break in /home/indutny/Code/git/indutny/myscript.js:1
+(setf (gethash "loc" realgud:trepanjs-pat-hash)
+ (make-realgud-loc-pat
+ :regexp (format
+ "\\(?:%s\\)*\\(?:break\\|exception\\) in
\\([^:]+\\):\\([0-9]*\\)"
+ realgud:trepanjs-term-escape)
+ :file-group 1
+ :line-group 2))
+
+;; Regular expression that describes a trepanjs command prompt
+;; For example:
+;; (trepanjs):
+(setf (gethash "prompt" realgud:trepanjs-pat-hash)
+ (make-realgud-loc-pat
+ :regexp "^(+trepanjs)+ "
+ ))
+
+;; Regular expression that describes a "breakpoint set" line
+;; * 4 var count = 0;
+(setf (gethash "brkpt-set" realgud:trepanjs-pat-hash)
+ (make-realgud-loc-pat
+ :regexp "^Breakpoint \\([0-9]+\\) set in file \\(.+\\), line
\\([0-9]+\\).\n"
+ :num 1
+ :file-group 2
+ :line-group 3))
+
+;; Regular expression that describes a V8 backtrace line.
+;; For example:
+;; at repl:1:7
+;; at Interface.controlEval
(/src/external-vcs/github/trepanjs/lib/interface.js:352:18)
+;; at REPLServer.b [as eval] (domain.js:183:18)
+(setf (gethash "lang-backtrace" realgud:trepanjs-pat-hash)
+ (make-realgud-loc-pat
+ :regexp "^\\(?:[\t ]+at \\)?\\([^:]+\\) (.*:\\([0-9]+\\):\\([0-9]+\\))"
+ :file-group 2
+ :line-group 3
+ :char-offset-group 4))
+
+;; Regular expression that describes a debugger "delete" (breakpoint) response.
+;; For example:
+;; Deleted breakpoint 1.
+(setf (gethash "brkpt-del" realgud:trepanjs-pat-hash)
+ (make-realgud-loc-pat
+ :regexp "^Deleted breakpoint \\([0-9]+\\).\n"
+ :num 1))
+
+(defconst realgud:trepanjs-debugger-name "trepanjs" "Name of debugger")
+
+;; Top frame number
+(setf (gethash "top-frame-num" realgud:trepanjs-pat-hash) 0)
+
+;; Regular expression that for a termination message.
+(setf (gethash "termination" realgud:trepanjs-pat-hash)
+ "^trepanjs: That's all, folks...\n")
+
+(setf (gethash realgud:trepanjs-debugger-name realgud-pat-hash)
realgud:trepanjs-pat-hash)
+
+(defvar realgud:trepanjs-command-hash (make-hash-table :test 'equal)
+ "Hash key is command name like 'quit' and the value is
+ the trepanjs command to use, like 'quit!'")
+
+(setf (gethash realgud:trepanjs-debugger-name
+ realgud-command-hash) realgud:trepanjs-command-hash)
+
+(setf (gethash "break" realgud:trepanjs-command-hash)
+ "setBreakpoint(%l)")
+;; We need aliases for step and next because the default would
+;; do step 1 and trepanjs doesn't handle this. Or when it does,
+;; it will probably look like step(1)
+(setf (gethash "step" realgud:trepanjs-command-hash) "step")
+(setf (gethash "next" realgud:trepanjs-command-hash) "next")
+
+(provide-me "realgud:trepanjs-")
diff --git a/realgud/debugger/trepanjs/track-mode.el
b/realgud/debugger/trepanjs/track-mode.el
new file mode 100644
index 0000000..4077442
--- /dev/null
+++ b/realgud/debugger/trepanjs/track-mode.el
@@ -0,0 +1,82 @@
+;;; Copyright (C) 2010, 2012-2015 Rocky Bernstein <address@hidden>
+;;; Ruby "trepanjs" Debugger tracking a comint or eshell buffer.
+
+(eval-when-compile (require 'cl))
+(require 'load-relative)
+(require-relative-list '(
+ "../../common/cmds"
+ "../../common/menu"
+ "../../common/track"
+ "../../common/track-mode"
+ )
+ "realgud-")
+(require-relative-list '("core" "init") "realgud:trepanjs-")
+(require-relative-list '("../../lang/ruby") "realgud-lang-")
+
+(declare-function realgud-track-mode 'realgud-track-mode)
+(declare-function realgud-track-mode-hook 'realgud-track-mode)
+(declare-function realgud-track-mode-setup 'realgud-track-mode)
+(declare-function realgud:track-set-debugger 'realgud-track-mode)
+(declare-function realgud-goto-line-for-pt 'realgud-track-mode)
+
+(realgud-track-mode-vars "trepanjs")
+
+(define-key realgud-track-mode-map
+ (kbd "C-c !!") 'realgud:goto-lang-backtrace-line)
+(define-key realgud-track-mode-map
+ (kbd "C-c !b") 'realgud:goto-debugger-backtrace-line)
+
+(declare-function realgud:ruby-populate-command-keys 'realgud-lang-ruby)
+
+(defun realgud:trepanjs-goto-control-frame-line (pt)
+ "Display the location mentioned by a control-frame line
+described by PT."
+ (interactive "d")
+ (realgud-goto-line-for-pt pt "control-frame"))
+
+(defun realgud:trepanjs-goto-syntax-error-line (pt)
+ "Display the location mentioned in a Syntax error line
+described by PT."
+ (interactive "d")
+ (realgud-goto-line-for-pt pt "syntax-error"))
+
+(realgud:ruby-populate-command-keys trepanjs-track-mode-map)
+
+(define-key trepanjs-track-mode-map
+ (kbd "C-c !c") 'realgud:trepanjs-goto-control-frame-line)
+(define-key trepanjs-track-mode-map
+ (kbd "C-c !s") 'realgud:trepanjs-goto-syntax-error-line)
+
+(defun trepanjs-track-mode-hook()
+ (if trepanjs-track-mode
+ (progn
+ (use-local-map trepanjs-track-mode-map)
+ (message "using trepanjs mode map")
+ )
+ (message "trepanjs track-mode-hook disable called"))
+)
+
+(define-minor-mode trepanjs-track-mode
+ "Minor mode for tracking trepanjs source locations inside a process shell
via realgud. trepanjs is a Ruby debugger.
+
+If called interactively with no prefix argument, the mode is toggled. A prefix
argument, captured as ARG, enables the mode if the argument is positive, and
disables it otherwise.
+
+\\{trepanjs-track-mode-map}
+"
+ :init-value nil
+ ;; :lighter " trepanjs" ;; mode-line indicator from realgud-track is
sufficient.
+ ;; The minor mode bindings.
+ :global nil
+ :group 'realgud:trepanjs
+ :keymap trepanjs-track-mode-map
+ (realgud:track-set-debugger "trepanjs")
+ (if trepanjs-track-mode
+ (progn
+ (realgud-track-mode-setup 't)
+ (trepanjs-track-mode-hook))
+ (progn
+ (setq realgud-track-mode nil)
+ ))
+)
+
+(provide-me "realgud:trepanjs-")
diff --git a/realgud/debugger/trepanjs/trepanjs.el
b/realgud/debugger/trepanjs/trepanjs.el
new file mode 100644
index 0000000..f153a3f
--- /dev/null
+++ b/realgud/debugger/trepanjs/trepanjs.el
@@ -0,0 +1,58 @@
+;;; Copyright (C) 2010-2011, 2013-2015 Rocky Bernstein <address@hidden>
+;; `trepanjs' Main interface to trepanjs via Emacs
+(require 'load-relative)
+(require-relative-list '("../../common/helper") "realgud-")
+(require-relative-list '("../../common/run") "realgud:")
+(require-relative-list '("core" "track-mode") "realgud:trepanjs-")
+
+(declare-function realgud:trepanjs-query-cmdline 'realgud:trepanjs-core)
+(declare-function realgud:trepanjs-parse-cmd-args 'realgud:trepanjs-core)
+(declare-function realgud:run-debugger 'realgud:run)
+
+;; This is needed, or at least the docstring part of it is needed to
+;; get the customization menu to work in Emacs 24.
+(defgroup realgud:trepanjs nil
+ "The realgud interface to the Ruby 1.9.2 1.9.3 \"trepanjsning\" debugger"
+ :group 'ruby
+ :group 'realgud
+ :version "24.1")
+
+;; -------------------------------------------------------------------
+;; User-definable variables
+;;
+
+(defcustom realgud:trepanjs-command-name
+ ;;"trepanjs --emacs 3"
+ "trepanjs"
+ "File name for executing the Ruby debugger and command options.
+This should be an executable on your path, or an absolute file name."
+ :type 'string
+ :group 'realgud:trepanjs)
+
+;;;###autoload
+(defun realgud:trepanjs (&optional opt-cmd-line no-reset)
+ "Invoke the trepanjs Ruby debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `trepanjs-parse-cmd-args' and path elements found by that
+are expanded using `expand-file-name'.
+
+Normally, command buffers are reused when the same debugger is
+reinvoked inside a command buffer with a similar command. If we
+discover that the buffer has prior command-buffer information and
+NO-RESET is nil, then that information which may point into other
+buffers and source buffers which may contain marks and fringe or
+marginal icons is reset. See `loc-changes-clear-buffer' to clear
+fringe and marginal icons.
+"
+ (interactive)
+ (realgud:run-debugger "trepanjs" 'realgud:trepanjs-query-cmdline
+ 'realgud:trepanjs-parse-cmd-args
+ 'realgud:trepanjs-minibuffer-history
+ opt-cmd-line no-reset)
+ )
+
+(defalias 'trepanjs 'realgud:trepanjs)
+(provide-me "realgud-")
+;;; trepanjs.el ends here
- [elpa] master be999ea 054/215: trepanjs backtrace format changes next release, (continued)
- [elpa] master be999ea 054/215: trepanjs backtrace format changes next release, Rocky Bernstein, 2016/07/30
- [elpa] master 5078d4e 056/215: Doc gdb regexp more., Rocky Bernstein, 2016/07/30
- [elpa] master 0664fb9 037/215: trepanjs/init.el: handle newly added fully-qualified paths, Rocky Bernstein, 2016/07/30
- [elpa] master e5d0f95 057/215: Fix typo poined out by dfelch., Rocky Bernstein, 2016/07/30
- [elpa] master 071b66c 052/215: DRY gub init captured numbered re's., Rocky Bernstein, 2016/07/30
- [elpa] master bd45ec9 023/215: backtrace.el: fix some bugs and remove some warnings, Rocky Bernstein, 2016/07/30
- [elpa] master 8e1ef01 047/215: core.el: correct trepanjs options, Rocky Bernstein, 2016/07/30
- [elpa] master 3a84860 040/215: DRY realgud:regexp-capture-num and add more FSF copyrights, Rocky Bernstein, 2016/07/30
- [elpa] master aa3125d 041/215: posix-shell.el: sometimes I can't use (format), Rocky Bernstein, 2016/07/30
- [elpa] master 2598619 039/215: init.el: bracketed short name is optional, Rocky Bernstein, 2016/07/30
- [elpa] master e554cad 027/215: Add trepanjs,
Rocky Bernstein <=
- [elpa] master ba7a8b1 045/215: bang on trepanjs and nodejs., Rocky Bernstein, 2016/07/30
- [elpa] master 5f664e2 055/215: Python trepan debuggers include instruction offset in location, Rocky Bernstein, 2016/07/30
- [elpa] master a4f3509 058/215: Add realgud:pdb-remote for remote kinds of pdb execution, e.g. telnet, Rocky Bernstein, 2016/07/30
- [elpa] master 1790056 059/215: Typo: Issue #45, Rocky Bernstein, 2016/07/30
- [elpa] master a016c6f 050/215: Administrivia, Rocky Bernstein, 2016/07/30
- [elpa] master 0dd37e2 053/215: Revise trepanjs regexps and add regexp test., Rocky Bernstein, 2016/07/30
- [elpa] master dd0c60a 066/215: I said remove perl5db as an alias, Rocky Bernstein, 2016/07/30
- [elpa] master 0514c68 069/215: Add melpa (nonstable) tag, Rocky Bernstein, 2016/07/30
- [elpa] master bdf317e 060/215: Try flycheck on this file., Rocky Bernstein, 2016/07/30
- [elpa] master 26fd0de 062/215: Show failure in message and in cmdbuf when we fail to invoke a debugger, Rocky Bernstein, 2016/07/30