Commits

Anonymous committed a8b3892

pdb.el portability fixes

Comments (0)

Files changed (3)

+1998-11-18  Charles G Waldman  <cgw@pgt.com>
+
+	* pdb.el:  fix gud-pdb-marker-filter so that pdb works
+	on Windows (backslash delimiters), and on directory names
+	containing spaces and hyphens.  Make pdb startup use
+	completing read.
+
 1998-07-09  SL Baur  <steve@altair.xemacs.org>
 
 	* package-info.in: Update provides.
 
 # This XEmacs package contains independent single file lisp packages
 
-VERSION = 1.06
+VERSION = 1.07
 AUTHOR_VERSION =
 MAINTAINER = XEmacs Development Team <xemacs-beta@xemacs.org>
 PACKAGE = debug
 ; requires 'pdb' to be an executable command which runs the pdb.py from 
 ; Python 1.4b3 or later (e.g. a symbolic link to /usr/local/lib/python1.4/pdb.py)
 
-; - copy pdb.el to your xemacs site-lisp directory (or somewhere else where
-;   else on your xemacs' load path)
-; - add (load-library "pdb.el") to your ~/.emacs file
+; On Windows platforms, you can place a "pdb.bat" file somewhere along
+; your path, containing something like 
+
+; "C:\Program Files\Python\python.exe" -u "C:\Program Files\Python\Lib\pdb.py" %1 %2 %3 %4 %5 %6 %7 %8 %9
+
+; (modify the paths according to where your local Python installation lives)
+
+; - copy pdb.el to your xemacs site-lisp directory (or somewhere else
+;   on your xemacs' load path)  Note - for XEmacs 21 this is not necessary
+; - add (load-library "pdb.el") to your ~/.emacs file (not needed for Xemacs 21)
 ; - open some python file and start pdb from Emacs with M-x pdb
 ; - type in pdb commands or use the gud commands from your source buffer
 ;   (C-x C-a C-...see the 'gud-def's below and gud.el for more information) 
 ; Tested with xemacs 19.13/19.14 / gud.el 1.3 / python 1.4b3.
 
 ; Wolfgang Weitz <wwe@aifb.uni-karlsruhe.de>
+
+; Charles G Waldman <cgw@pgt.com> 1998-11-18
+; Fixed gud-pdb-marker filter so this works on Windows, as well as
+; directories with a hyphen in the name (like site-packages).  Also
+; use completing read to read the command line at startup.
 ;--------------------------------------------------------------------------
 
 ;;
 
 (defun gud-pdb-marker-filter (string)
   (if (string-match
-       "> \\([/a-zA-Z_][/a-zA-Z0-9_\\.]*\\)(\\([0-9]+\\))[?a-zA-Z_][a-zA-Z0-9_]*()\\(->[^\n]+\\)?\n"
+       "> \\([-/\\\\: a-zA-Z0-9_\\.]+\\)(\\([0-9]+\\))[?a-zA-Z0-9_]+().*"
          string)
       (setq gud-last-frame
 	    (cons
       The directory containing FILE becomes the initial working directory
       and source-file directory for your debugger."
   (interactive
-  (list (read-from-minibuffer "Run pdb (like this): "
+  (list (read-shell-command "Run pdb (like this): "
 			       (if (consp gud-pdb-history)
-				   (car gud-pdb-history) "pdb ") nil nil
+				   (car gud-pdb-history) "pdb ") 
 			       '(gud-pdb-history . 1))))
   (gud-overload-functions '((gud-massage-args . gud-pdb-massage-args)
 			    (gud-marker-filter . gud-pdb-marker-filter)
   (gud-def gud-finish "return"      "\C-f" "Finish executing current function.")
   (gud-def gud-up     "up %p"       "<" "Up N stack frames (numeric arg).")
   (gud-def gud-down   "down %p"     ">" "Down N stack frames (numeric arg).")
-  (gud-def gud-print  "p %e"        "\C-p" "Evaluate C expression at point.")
+  (gud-def gud-print  "p %e"        "\C-p" "Evaluate Python expression at point.")
  
   (gud-def gud-where "where" "?" "where")