aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-06-15 21:04:48 +0000
committerRichard M. Stallman1993-06-15 21:04:48 +0000
commitfce222c7f0c7f5d2e90bc5a1f5991b4a7b65e616 (patch)
treee987f387d3a21d9282c249589935b12b30e4a6cd
parentcbd1f89c79d74fcd6516fedecbdb4b5b67124e5b (diff)
downloademacs-fce222c7f0c7f5d2e90bc5a1f5991b4a7b65e616.tar.gz
emacs-fce222c7f0c7f5d2e90bc5a1f5991b4a7b65e616.zip
(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.
-rw-r--r--lisp/gud.el37
1 files changed, 18 insertions, 19 deletions
diff --git a/lisp/gud.el b/lisp/gud.el
index 9bc4f6d00b5..94d983b0c0d 100644
--- a/lisp/gud.el
+++ b/lisp/gud.el
@@ -321,13 +321,21 @@ and source-file directory for your debugger."
321;; ====================================================================== 321;; ======================================================================
322;; xdb (HP PARISC debugger) functions 322;; xdb (HP PARISC debugger) functions
323 323
324(defvar gud-xdb-directories nil
325 "*A list of directories that xdb should search for source code.
326If nil, only source files in the program directory
327will be known to xdb.
328
329The file names should be absolute, or relative to the directory
330containing the executable being debugged.")
331
324(defun gud-xdb-debugger-startup (file args) 332(defun gud-xdb-debugger-startup (file args)
325 (apply 'make-comint (concat "gud-" file) "xdb" nil 333 (apply 'make-comint (concat "gud-" file) "xdb" nil
326 (append (let ((paths gud-xdb-paths) 334 (append (let ((directories gud-xdb-directories)
327 (result nil)) 335 (result nil))
328 (while paths 336 (while directories
329 (setq result (cons (car paths) (cons "-d" result))) 337 (setq result (cons (car directories) (cons "-d" result)))
330 (setq paths (cdr paths))) 338 (setq directories (cdr directories)))
331 (nreverse result)) 339 (nreverse result))
332 args))) 340 args)))
333 341
@@ -336,13 +344,13 @@ and source-file directory for your debugger."
336 (let ((result nil)) 344 (let ((result nil))
337 (if (file-exists-p f) 345 (if (file-exists-p f)
338 (setq result (expand-file-name f)) 346 (setq result (expand-file-name f))
339 (let ((paths gud-xdb-paths)) 347 (let ((directories gud-xdb-directories))
340 (while paths 348 (while directories
341 (let ((path (concat (car paths) "/" f))) 349 (let ((path (concat (car directories) "/" f)))
342 (if (file-exists-p path) 350 (if (file-exists-p path)
343 (setq result (expand-file-name path) 351 (setq result (expand-file-name path)
344 paths nil))) 352 directories nil)))
345 (setq paths (cdr paths))))) 353 (setq directories (cdr directories)))))
346 result)) 354 result))
347 355
348;; xdb does not print the lines all at once, so we have to accumulate them 356;; xdb does not print the lines all at once, so we have to accumulate them
@@ -367,15 +375,6 @@ and source-file directory for your debugger."
367 (setq gud-last-frame (cons file line)))))) 375 (setq gud-last-frame (cons file line))))))
368 (or result ""))) 376 (or result "")))
369 377
370(defvar gud-xdb-paths nil
371 "*A list of directories containing source code that should be made known
372to xdb on startup. If nil, only source files in the program directory
373will be known to xdb.
374
375The pathnames should be full, or relative to the program directory.
376Program directory refers to the directory of the program that is being
377debugged.")
378
379(defun gud-xdb-find-file (f) 378(defun gud-xdb-find-file (f)
380 (let ((realf (gud-xdb-file-name f))) 379 (let ((realf (gud-xdb-file-name f)))
381 (if realf (find-file-noselect realf)))) 380 (if realf (find-file-noselect realf))))
@@ -386,7 +385,7 @@ debugged.")
386The directory containing FILE becomes the initial working directory 385The directory containing FILE becomes the initial working directory
387and source-file directory for your debugger. 386and source-file directory for your debugger.
388 387
389The variable 'gud-xdb-paths' can be set to a list of program source 388You can set the variable 'gud-xdb-directories' to a list of program source
390directories if your program contains sources from more than one directory." 389directories if your program contains sources from more than one directory."
391 (interactive "sRun xdb (like this): xdb") 390 (interactive "sRun xdb (like this): xdb")
392 (gud-overload-functions '((gud-debugger-startup . gud-xdb-debugger-startup) 391 (gud-overload-functions '((gud-debugger-startup . gud-xdb-debugger-startup)