;; Version: 1.3
;; Keywords: unix, tools
-;; Copyright (C) 1992, 1993 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
"Prefix of all GUD commands valid in C buffers.")
(global-set-key (concat gud-key-prefix "\C-l") 'gud-refresh)
-(global-set-key "\C-x " 'gud-break) ;; backward compatibility hack
+(define-key ctl-x-map " " 'gud-break) ;; backward compatibility hack
;; ======================================================================
;; the overloading mechanism
gud-overload-alist))
(defun gud-massage-args (file args)
- (error "GUD not properly entered."))
+ (error "GUD not properly entered"))
(defun gud-marker-filter (str)
- (error "GUD not properly entered."))
+ (error "GUD not properly entered"))
(defun gud-find-file (f)
- (error "GUD not properly entered."))
+ (error "GUD not properly entered"))
\f
;; ======================================================================
;; command definition
;; receive a chunk of text which looks like it might contain the
;; beginning of a marker, we save it here between calls to the
;; filter.
-(make-local-variable 'gud-marker-acc)
(defvar gud-marker-acc "")
+(make-variable-buffer-local 'gud-marker-acc)
(defun gud-gdb-marker-filter (string)
(save-match-data
(let ((output ""))
;; Process all the complete markers in this chunk.
- (while (string-match "^\032\032\\([^:\n]*\\):\\([0-9]*\\):.*\n"
+ (while (string-match "\032\032\\([^:\n]*\\):\\([0-9]*\\):.*\n"
gud-marker-acc)
(setq
;; gud-marker-acc until we receive the rest of it. Since we
;; know the full marker regexp above failed, it's pretty simple to
;; test for marker starts.
- (if (string-match "^\032.*\\'" gud-marker-acc)
+ (if (string-match "\032.*\\'" gud-marker-acc)
(progn
;; Everything before the potential marker start can be output.
(setq output (concat output (substring gud-marker-acc
nil nil
'(gud-sdb-history . 1))))
(if (and gud-sdb-needs-tags
- (not (and (boundp 'tags-file-name) (file-exists-p tags-file-name))))
+ (not (and (boundp 'tags-file-name)
+ (stringp tags-file-name)
+ (file-exists-p tags-file-name))))
(error "The sdb support requires a valid tags table to work."))
(gud-overload-functions '((gud-massage-args . gud-sdb-massage-args)
(gud-marker-filter . gud-sdb-marker-filter)
;; We haven't tested gud on this system:
(string-match "^mips-[^-]*-riscos" system-configuration)
;; It's documented on OSF/1.3
- (string-match "^mips-[^-]*-osf1" system-configuration))
+ (string-match "^mips-[^-]*-osf1" system-configuration)
+ (string-match "^alpha-[^-]*-osf" system-configuration))
"Non-nil to assume the MIPS/OSF dbx conventions (argument `-emacs').")
(defun gud-mipsdbx-massage-args (file args)
(while (string-match
;; This is like th gdb marker but with an optional
;; leading break point number like `[1] '
- "^[][ 0-9]*\032\032\\([^:\n]*\\):\\([0-9]*\\):.*\n"
+ "[][ 0-9]*\032\032\\([^:\n]*\\):\\([0-9]*\\):.*\n"
gud-marker-acc)
(setq
;; gud-marker-acc until we receive the rest of it. Since we
;; know the full marker regexp above failed, it's pretty simple to
;; test for marker starts.
- (if (string-match "^[][ 0-9]*\032.*\\'" gud-marker-acc)
+ (if (string-match "[][ 0-9]*\032.*\\'" gud-marker-acc)
(progn
;; Everything before the potential marker start can be output.
(setq output (concat output (substring gud-marker-acc
;; Make dbx give out the source location info that we need.
(process-send-string (get-buffer-process gud-comint-buffer)
"printf \"\032\032%1d:\",$curline;file\n"))
- ((or (string-match "-sunos" (symbol-name system-type))
- (string-match "-solaris" (symbol-name system-type)))
+ ((or (string-match "-sunos" system-configuration)
+ (string-match "-solaris" system-configuration))
;; The following works for both the UCB and SunPro 2.0.1 versions
;; of dbx. The `stop' is lost using the `\n' separator as in the
;; default case. Is there a dbx where the newline is actually
(let ((output ""))
;; Process all the complete markers in this chunk.
- (while (string-match "^\032\032\\([^:\n]*\\):\\([0-9]*\\):.*\n"
+ (while (string-match "\032\032\\([^:\n]*\\):\\([0-9]*\\):.*\n"
gud-marker-acc)
(setq
;; gud-marker-acc until we receive the rest of it. Since we
;; know the full marker regexp above failed, it's pretty simple to
;; test for marker starts.
- (if (string-match "^\032.*\\'" gud-marker-acc)
+ (if (string-match "\032.*\\'" gud-marker-acc)
(progn
;; Everything before the potential marker start can be output.
(setq output (concat output (substring gud-marker-acc
;; to get around the fact that this is called inside a save-excursion.
(defun gud-display-line (true-file line)
- (let* ((buffer (gud-find-file true-file))
+ (let* ((last-nonmenu-event t) ; Prevent use of dialog box for questions.
+ (buffer (gud-find-file true-file))
(window (display-buffer buffer))
(pos))
;;; (if (equal buffer (current-buffer))