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

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

[elpa] master e8fc998 116/215: Merge pull request #85 from cpitclaudel/8


From: Rocky Bernstein
Subject: [elpa] master e8fc998 116/215: Merge pull request #85 from cpitclaudel/84-pdb-fixes
Date: Sat, 30 Jul 2016 14:48:58 +0000 (UTC)

branch: master
commit e8fc998362b04b48f3915ab9745cd970f5a437db
Merge: d437c3d c919f96
Author: R. Bernstein <address@hidden>
Commit: R. Bernstein <address@hidden>

    Merge pull request #85 from cpitclaudel/84-pdb-fixes
    
    Improve command mappings in pdb-command-hash
---
 realgud/debugger/ipdb/init.el |   24 ++++++++++++++++++------
 realgud/debugger/pdb/init.el  |   21 +++++++++++++++++----
 2 files changed, 35 insertions(+), 10 deletions(-)

diff --git a/realgud/debugger/ipdb/init.el b/realgud/debugger/ipdb/init.el
index c854f68..96ef9e3 100644
--- a/realgud/debugger/ipdb/init.el
+++ b/realgud/debugger/ipdb/init.el
@@ -110,11 +110,23 @@ realgud-loc-pat struct")
 (setf (gethash "ipdb" realgud-pat-hash) realgud:ipdb-pat-hash)
 
 (defvar realgud:ipdb-command-hash (make-hash-table :test 'equal)
-  "Hash key is command name like 'shell' and the value is
-  the ipdb command to use, like 'python'")
-
-(setf (gethash "shell" realgud:ipdb-command-hash) "python")
-(setf (gethash "eval"  realgud:ipdb-command-hash) "p %s")
-(setf (gethash "ipdb" realgud-command-hash) realgud:ipdb-command-hash)
+  "Hash key is command name like 'finish' and the value is
+the ipdb command to use, like 'return'")
+
+(setf (gethash "pdb" realgud-command-hash) realgud:ipdb-command-hash)
+
+;; Mappings between PDB-specific names and GUD names
+(setf (gethash "finish" realgud:ipdb-command-hash) "return")
+(setf (gethash "kill" realgud:ipdb-command-hash) "quit")
+(setf (gethash "backtrace" realgud:ipdb-command-hash) "where")
+;; Clear in Python does both the usual “delete” and “clear”
+(setf (gethash "delete" realgud:ipdb-command-hash) "clear %p")
+(setf (gethash "clear" realgud:ipdb-command-hash) "clear %X:%l")
+;; Use ‘!’ instead of ‘p’, since ‘p’ only works for expressions, not statements
+(setf (gethash "eval" realgud:ipdb-command-hash) "!%s")
+
+;; Unsupported features:
+(setf (gethash "shell" realgud:ipdb-command-hash) "*not-implemented*")
+(setf (gethash "frame" realgud:ipdb-command-hash) "*not-implemented*")
 
 (provide-me "realgud:ipdb-")
diff --git a/realgud/debugger/pdb/init.el b/realgud/debugger/pdb/init.el
index 4ad8230..9aa5b0b 100644
--- a/realgud/debugger/pdb/init.el
+++ b/realgud/debugger/pdb/init.el
@@ -108,12 +108,25 @@ realgud-loc-pat struct")
 
 (setf (gethash "pdb" realgud-pat-hash) realgud:pdb-pat-hash)
 
+
 (defvar realgud:pdb-command-hash (make-hash-table :test 'equal)
-  "Hash key is command name like 'shell' and the value is
-  the pdb command to use, like 'python'")
+  "Hash key is command name like 'finish' and the value is
+the pdb command to use, like 'return'")
 
-(setf (gethash "shell" realgud:pdb-command-hash) "python")
-(setf (gethash "eval"  realgud:pdb-command-hash) "p %s")
 (setf (gethash "pdb" realgud-command-hash) realgud:pdb-command-hash)
 
+;; Mappings between PDB-specific names and GUD names
+(setf (gethash "finish" realgud:pdb-command-hash) "return")
+(setf (gethash "kill" realgud:pdb-command-hash) "quit")
+(setf (gethash "backtrace" realgud:pdb-command-hash) "where")
+;; Clear in Python does both the usual “delete” and “clear”
+(setf (gethash "delete" realgud:pdb-command-hash) "clear %p")
+(setf (gethash "clear" realgud:pdb-command-hash) "clear %X:%l")
+;; Use ‘!’ instead of ‘p’, since ‘p’ only works for expressions, not statements
+(setf (gethash "eval" realgud:pdb-command-hash) "!%s")
+
+;; Unsupported features:
+(setf (gethash "shell" realgud:pdb-command-hash) "*not-implemented*")
+(setf (gethash "frame" realgud:pdb-command-hash) "*not-implemented*")
+
 (provide-me "realgud:pdb-")



reply via email to

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