[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master a4f3509 058/215: Add realgud:pdb-remote for remote kinds o
From: |
Rocky Bernstein |
Subject: |
[elpa] master a4f3509 058/215: Add realgud:pdb-remote for remote kinds of pdb execution, e.g. telnet |
Date: |
Sat, 30 Jul 2016 14:48:53 +0000 (UTC) |
branch: master
commit a4f3509e14515f37e96932ac88388367bc460e1f
Author: rocky <address@hidden>
Commit: rocky <address@hidden>
Add realgud:pdb-remote for remote kinds of pdb execution, e.g. telnet
hostname port-number. This hasn't been tested.
---
realgud/debugger/pdb/core.el | 27 ++++++++++++++++++++++++++-
realgud/debugger/pdb/pdb.el | 28 ++++++++++++++++++++++++++++
2 files changed, 54 insertions(+), 1 deletion(-)
diff --git a/realgud/debugger/pdb/core.el b/realgud/debugger/pdb/core.el
index 36a7634..520c7c7 100644
--- a/realgud/debugger/pdb/core.el
+++ b/realgud/debugger/pdb/core.el
@@ -36,6 +36,9 @@
(defvar realgud:pdb-minibuffer-history nil
"minibuffer history list for the command `pdb'.")
+(defvar realgud:pdb-remote-minibuffer-history nil
+ "minibuffer history list for the command `pdb-remote'.")
+
(easy-mmode-defmap pdb-minibuffer-local-map
'(("\C-i" . comint-dynamic-complete-filename))
"Keymap for minibuffer prompting of gud startup command."
@@ -142,7 +145,29 @@ Note that the script name path has been expanded via
`expand-file-name'.
)))
(list interpreter-args debugger-args script-args annotate-p))))
-;; To silence Warning: reference to free variable
+(defun pdb-parse-remote-cmd-args (orig-args)
+ "Parse command line ORIG-ARGS
+ORIG-ARGS should contain a tokenized list of the command line to run.
+
+We return the a list containing:
+* the command processor (e.g. python) and it's arguments if any - a list of
strings
+* the name of the debugger given (e.g. pdb) and its arguments - a list of
strings
+* the script name and its arguments - list of strings
+* nil
+
+For example for the following input:
+ (map 'list 'symbol-name
+ '(telnet localhost 6900))
+
+we might return:
+ ((\"telnet\" \"localhost\" \"6900\") (\"pdb\") (\"\") nil)
+
+Note that the script name path has been expanded via `expand-file-name'.
+"
+ (list orig-args '("pdb") '("") nil)
+ )
+
+ ;; To silence Warning: reference to free variable
(defvar realgud:pdb-command-name)
(defun pdb-suggest-invocation (debugger-name)
diff --git a/realgud/debugger/pdb/pdb.el b/realgud/debugger/pdb/pdb.el
index 5c643a3..8fad6b9 100644
--- a/realgud/debugger/pdb/pdb.el
+++ b/realgud/debugger/pdb/pdb.el
@@ -75,6 +75,34 @@ fringe and marginal icons.
)
+;;;###autoload
+(defun realgud:pdb-remote (&optional opt-cmd-line no-reset)
+ "Invoke the pdb Python debugger and start the Emacs user interface.
+
+String OPT-CMD-LINE specifies how to run pdb. You will be prompted
+for a command line is one isn't supplied.
+
+OPT-COMMAND-LINE is treated like a shell string; arguments are
+tokenized by `split-string-and-unquote'. The tokenized string is
+parsed by `pdb-parse-remote-cmd-args' and path elements found by that
+are expanded using `realgud:expand-file-name-if-exists'.
+
+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 "pdb" 'pdb-remote-query-cmdline
+ 'pdb-parse-remote-cmd-args
+ 'realgud:pdb-remote-minibuffer-history
+ opt-cmd-line no-reset)
+ )
+
+
(defalias 'pdb 'realgud:pdb)
(provide-me "realgud-")
- [elpa] master e5d0f95 057/215: Fix typo poined out by dfelch., (continued)
- [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, 2016/07/30
- [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 <=
- [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
- [elpa] master 3071b70 065/215: Try cask, Rocky Bernstein, 2016/07/30
- [elpa] master 3b0e42c 067/215: realgud-exec-shell: Make sure we switch to cmdbuf even when there is an, Rocky Bernstein, 2016/07/30
- [elpa] master 2a708cc 068/215: Error on realgud:cmdbuf-associate if you assocate a non-command buffer., Rocky Bernstein, 2016/07/30