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

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

[elpa] master 72c83d7 114/215: Improve command mappings in pdb-command-h


From: Rocky Bernstein
Subject: [elpa] master 72c83d7 114/215: Improve command mappings in pdb-command-hash
Date: Sat, 30 Jul 2016 14:48:58 +0000 (UTC)

branch: master
commit 72c83d75ae1f353eb53955e61af78a9e888e21ec
Author: Clément Pit--Claudel <address@hidden>
Commit: Clément Pit--Claudel <address@hidden>

    Improve command mappings in pdb-command-hash
    
    This fixes parts of issue #82.
---
 realgud/debugger/pdb/init.el |   21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

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]