changeset 3745:3c4f7e74e3f0

(gud-xdb-directories): Renamed from gud-xdb-paths. Defvar moved earlier. All uses changed. (gud-xdb-debugger-startup): Rename local var `paths'. (gud-xdb-file-name): Likewise.
author Richard M. Stallman <rms@gnu.org>
date Tue, 15 Jun 1993 21:04:48 +0000
parents f344542ac7fd
children 4a96c64c4d5e
files lisp/gud.el
diffstat 1 files changed, 18 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gud.el	Tue Jun 15 21:00:33 1993 +0000
+++ b/lisp/gud.el	Tue Jun 15 21:04:48 1993 +0000
@@ -321,13 +321,21 @@
 ;; ======================================================================
 ;; xdb (HP PARISC debugger) functions
 
+(defvar gud-xdb-directories nil
+  "*A list of directories that xdb should search for source code.
+If nil, only source files in the program directory
+will be known to xdb.
+
+The file names should be absolute, or relative to the directory
+containing the executable being debugged.")
+
 (defun gud-xdb-debugger-startup (file args)
   (apply 'make-comint (concat "gud-" file) "xdb" nil
-         (append (let ((paths gud-xdb-paths)
+         (append (let ((directories gud-xdb-directories)
                        (result nil))
-                   (while paths
-                     (setq result (cons (car paths) (cons "-d" result)))
-                     (setq paths (cdr paths)))
+                   (while directories
+                     (setq result (cons (car directories) (cons "-d" result)))
+                     (setq directories (cdr directories)))
                    (nreverse result))
                  args)))
 
@@ -336,13 +344,13 @@
   (let ((result nil))
     (if (file-exists-p f)
         (setq result (expand-file-name f))
-      (let ((paths gud-xdb-paths))
-        (while paths
-          (let ((path (concat (car paths) "/" f)))
+      (let ((directories gud-xdb-directories))
+        (while directories
+          (let ((path (concat (car directories) "/" f)))
             (if (file-exists-p path)
                 (setq result (expand-file-name path)
-                      paths nil)))
-          (setq paths (cdr paths)))))
+                      directories nil)))
+          (setq directories (cdr directories)))))
     result))
 
 ;; xdb does not print the lines all at once, so we have to accumulate them
@@ -367,15 +375,6 @@
                   (setq gud-last-frame (cons file line))))))
     (or result "")))    
                
-(defvar gud-xdb-paths nil
-  "*A list of directories containing source code that should be made known
-to xdb on startup.  If nil, only source files in the program directory
-will be known to xdb.
-
-The pathnames should be full, or relative to the program directory.
-Program directory refers to the directory of the program that is being
-debugged.")
-
 (defun gud-xdb-find-file (f)
   (let ((realf (gud-xdb-file-name f)))
     (if realf (find-file-noselect realf))))
@@ -386,7 +385,7 @@
 The directory containing FILE becomes the initial working directory
 and source-file directory for your debugger.
 
-The variable 'gud-xdb-paths' can be set to a list of program source
+You can set the variable 'gud-xdb-directories' to a list of program source
 directories if your program contains sources from more than one directory."
   (interactive "sRun xdb (like this): xdb")
   (gud-overload-functions '((gud-debugger-startup . gud-xdb-debugger-startup)