emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master b405494 191/215: Fill out pdb-remote execution


From: Rocky Bernstein
Subject: [elpa] master b405494 191/215: Fill out pdb-remote execution
Date: Sat, 30 Jul 2016 14:49:05 +0000 (UTC)

branch: master
commit b4054949dfa2247a87cba36887ced12803aeed87
Author: rocky <address@hidden>
Commit: rocky <address@hidden>

    Fill out pdb-remote execution
    
    Fixes #128 ?
---
 realgud/common/run.el         |    6 +++---
 realgud/debugger/ipdb/core.el |   21 ++++++++++++++++++---
 realgud/debugger/ipdb/ipdb.el |    2 +-
 realgud/debugger/pdb/core.el  |   23 +++++++++++++++++++----
 realgud/debugger/pdb/pdb.el   |    4 ++--
 5 files changed, 43 insertions(+), 13 deletions(-)

diff --git a/realgud/common/run.el b/realgud/common/run.el
index 1108673..fc6268e 100644
--- a/realgud/common/run.el
+++ b/realgud/common/run.el
@@ -1,4 +1,4 @@
-;; Copyright (C) 2015 Free Software Foundation, Inc
+;; Copyright (C) 2015, 2016 Free Software Foundation, Inc
 
 ;; Author: Rocky Bernstein <address@hidden>
 
@@ -155,7 +155,7 @@ details of the error. The command buffer or nil is 
returned."
 (defun realgud:run-debugger (debugger-name query-cmdline-fn parse-cmd-args-fn
                                           minibuffer-history
                                           &optional opt-command-line
-                                          no-reset)
+                                          no-reset opt-script-name)
   "Invoke the a debugger and start the Emacs user interface.
 
 String OPT-COMMAND-LINE specifies how to run DEBUGGER-NAME. You
@@ -174,7 +174,7 @@ Otherwise nil is returned.
         (cmd-args (split-string-and-unquote cmd-str))
         (parsed-args (funcall parse-cmd-args-fn cmd-args))
         (script-args (caddr parsed-args))
-        (script-name (car script-args))
+        (script-name (or opt-script-name (car script-args)))
         (parsed-cmd-args
          (remove-if 'nil (realgud:flatten parsed-args)))
         )
diff --git a/realgud/debugger/ipdb/core.el b/realgud/debugger/ipdb/core.el
index 46193be..1bd3b46 100644
--- a/realgud/debugger/ipdb/core.el
+++ b/realgud/debugger/ipdb/core.el
@@ -19,6 +19,7 @@
 
 (eval-when-compile (require 'cl))
 
+(require 'comint)
 (require 'load-relative)
 (require-relative-list '("../../common/track"
                         "../../common/core"
@@ -31,6 +32,7 @@
 (declare-function realgud-parse-command-arg 'realgud-core)
 (declare-function realgud-query-cmdline 'realgud-core)
 (declare-function realgud-suggest-invocation 'realgud-core)
+(declare-function realgud-get-cmdbuf   'realgud-buffer-helper)
 
 ;; FIXME: I think the following could be generalized and moved to
 ;; realgud-... probably via a macro.
@@ -42,7 +44,7 @@
 
 (easy-mmode-defmap ipdb-minibuffer-local-map
   '(("\C-i" . comint-dynamic-complete-filename))
-  "Keymap for minibuffer prompting of gud startup command."
+  "Keymap for minibuffer prompting of debugger startup command."
   :inherit minibuffer-local-map)
 
 ;; FIXME: I think this code and the keymaps and history
@@ -54,6 +56,15 @@
    'realgud:ipdb-minibuffer-history
    opt-debugger))
 
+;; FIXME: I think this code and the keymaps and history
+;; variable chould be generalized, perhaps via a macro.
+(defun ipdb-remote-query-cmdline ()
+  (realgud-query-cmdline
+   'ipdb-suggest-invocation
+   ipdb-minibuffer-local-map
+   'realgud:ipdb-remote-minibuffer-history
+   "telnet"))
+
 (defun ipdb-parse-cmd-args (orig-args)
   "Parse command line ORIG-ARGS for the annotate level and name of script to 
debug.
 
@@ -161,16 +172,20 @@ For example for the following input:
    '(telnet localhost 6900))
 
 we might return:
-   ((\"telnet\" \"localhost\" \"6900\") (\"ipdb\") (\"\") nil)
+   ((\"telnet\" \"localhost\" \"6900\") nil nil nil)
 
 Note that the script name path has been expanded via `expand-file-name'.
 "
-    (list orig-args '("ipdb") '("") nil)
+    (list orig-args '("ipdb") nil nil nil)
   )
 
   ;; To silence Warning: reference to free variable
 (defvar realgud:ipdb-command-name)
 
+(defun ipdb-remote-suggest-invocation (debugger-name)
+  "Suggest an ipdb command invocation via `realgud-suggest-invocaton'"
+  "telnet 127.0.0.1 4000")
+
 (defun ipdb-suggest-invocation (debugger-name)
   "Suggest a ipdb command invocation via `realgud-suggest-invocaton'"
   (realgud-suggest-invocation realgud:ipdb-command-name
diff --git a/realgud/debugger/ipdb/ipdb.el b/realgud/debugger/ipdb/ipdb.el
index 447aeef..27dff12 100644
--- a/realgud/debugger/ipdb/ipdb.el
+++ b/realgud/debugger/ipdb/ipdb.el
@@ -109,7 +109,7 @@ fringe and marginal icons.
   (let ((cmd-buf (realgud:run-debugger "ipdb" 'ipdb-remote-query-cmdline
                                        'ipdb-parse-remote-cmd-args
                                        'realgud:ipdb-remote-minibuffer-history
-                                       opt-cmd-line no-reset))
+                                       opt-cmd-line no-reset "remote-ipdb"))
         )
     (add-hook 'completion-at-point-functions
               'realgud:ipdb-completion-at-point nil t)
diff --git a/realgud/debugger/pdb/core.el b/realgud/debugger/pdb/core.el
index 520c7c7..18ad431 100644
--- a/realgud/debugger/pdb/core.el
+++ b/realgud/debugger/pdb/core.el
@@ -1,4 +1,4 @@
-;; Copyright (C) 2015 Free Software Foundation, Inc
+;; Copyright (C) 2015, 2016 Free Software Foundation, Inc
 
 ;; Author: Rocky Bernstein <address@hidden>
 
@@ -41,7 +41,7 @@
 
 (easy-mmode-defmap pdb-minibuffer-local-map
   '(("\C-i" . comint-dynamic-complete-filename))
-  "Keymap for minibuffer prompting of gud startup command."
+  "Keymap for minibuffer prompting of debugger startup command."
   :inherit minibuffer-local-map)
 
 ;; FIXME: I think this code and the keymaps and history
@@ -53,6 +53,15 @@
    'realgud:pdb-minibuffer-history
    opt-debugger))
 
+;; FIXME: I think this code and the keymaps and history
+;; variable chould be generalized, perhaps via a macro.
+(defun pdb-remote-query-cmdline (not-used)
+  (realgud-query-cmdline
+   'pdb-remote-suggest-invocation
+   pdb-minibuffer-local-map
+   'realgud:pdb-remote-minibuffer-history
+   "telnet"))
+
 (defun pdb-parse-cmd-args (orig-args)
   "Parse command line ORIG-ARGS for the annotate level and name of script to 
debug.
 
@@ -160,16 +169,22 @@ For example for the following input:
    '(telnet localhost 6900))
 
 we might return:
-   ((\"telnet\" \"localhost\" \"6900\") (\"pdb\") (\"\") nil)
+   ((\"telnet\" \"localhost\" \"6900\") nil nil nil)
 
 Note that the script name path has been expanded via `expand-file-name'.
 "
-    (list orig-args '("pdb") '("") nil)
+    (list orig-args nil nil nil)
   )
 
   ;; To silence Warning: reference to free variable
 (defvar realgud:pdb-command-name)
 
+(defun pdb-remote-suggest-invocation (debugger-name)
+  "Suggest a pdb command invocation via `realgud-suggest-invocaton'"
+  "telnet 127.0.0.1 4000"
+  )
+
+
 (defun pdb-suggest-invocation (debugger-name)
   "Suggest a pdb command invocation via `realgud-suggest-invocaton'"
   (realgud-suggest-invocation realgud:pdb-command-name
diff --git a/realgud/debugger/pdb/pdb.el b/realgud/debugger/pdb/pdb.el
index 4e907b7..1946478 100644
--- a/realgud/debugger/pdb/pdb.el
+++ b/realgud/debugger/pdb/pdb.el
@@ -1,4 +1,4 @@
-;; Copyright (C) 2015 Free Software Foundation, Inc
+;; Copyright (C) 2015, 2016 Free Software Foundation, Inc
 
 ;; Author: Rocky Bernstein <address@hidden>
 
@@ -99,7 +99,7 @@ fringe and marginal icons.
   (realgud:run-debugger "pdb" 'pdb-remote-query-cmdline
                        'pdb-parse-remote-cmd-args
                        'realgud:pdb-remote-minibuffer-history
-                       opt-cmd-line no-reset)
+                       opt-cmd-line no-reset "remote-pdb")
   )
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]