worley@EDDIE.MIT.EDU (Dale Worley) (06/08/89)
Following are the diffs to gdb.el so that it will use comint.el for
shell support, rather than shell.el.
Dale
--
Dale Worley, Compass, Inc. worley@compass.com
*** gdb.el Sun May 22 18:10:29 1988
--- comint-gdb.el Wed Jun 7 19:05:11 1989
***************
*** 5,10 ****
--- 5,12 ----
;; Some ideas are due to Masanobu.
+ ;; Modified to use comint by Dale Worley (drw@math.mit.edu).
+
;; This file is part of GNU Emacs.
;; Copyright (C) 1988 Free Software Foundation, Inc.
***************
*** 57,63 ****
;; appears in the output.
! (require 'shell)
(defvar gdb-prompt-pattern "^(.*gdb[+]?) *"
"A regexp to recognize the prompt for gdb or gdb+.")
--- 59,66 ----
;; appears in the output.
! (require 'cmushell) ; cmushell requires comint, so we don't
! ; have to specify it ourselves
(defvar gdb-prompt-pattern "^(.*gdb[+]?) *"
"A regexp to recognize the prompt for gdb or gdb+.")
***************
*** 67,74 ****
(if gdb-mode-map
nil
! (setq gdb-mode-map (copy-keymap shell-mode-map))
(define-key gdb-mode-map "\C-l" 'gdb-refresh))
(define-key ctl-x-map " " 'gdb-break)
--- 70,77 ----
(if gdb-mode-map
nil
! (setq gdb-mode-map (copy-keymap cmushell-mode-map))
(define-key gdb-mode-map "\C-l" 'gdb-refresh))
(define-key ctl-x-map " " 'gdb-break)
***************
*** 124,129 ****
--- 127,133 ----
C-x SPACE sets break point at current line."
(interactive)
(kill-all-local-variables)
+ (comint-mode)
(setq major-mode 'gdb-mode)
(setq mode-name "Inferior Gdb")
(setq mode-line-process '(": %s"))
***************
*** 142,148 ****
(setq gdb-filter-accumulator nil)
(make-local-variable 'shell-prompt-pattern)
(setq shell-prompt-pattern gdb-prompt-pattern)
! (run-hooks 'shell-mode-hook 'gdb-mode-hook))
(defvar current-gdb-buffer nil)
--- 146,152 ----
(setq gdb-filter-accumulator nil)
(make-local-variable 'shell-prompt-pattern)
(setq shell-prompt-pattern gdb-prompt-pattern)
! (run-hooks 'cmushell-mode-hook 'gdb-mode-hook))
(defvar current-gdb-buffer nil)
***************
*** 161,167 ****
(setq default-directory (file-name-directory path))
(or (bolp) (newline))
(insert "Current directory is " default-directory "\n")
! (make-shell (concat "gdb-" file) gdb-command-name nil "-fullname"
"-cd" default-directory file)
(gdb-mode)
(set-process-filter (get-buffer-process (current-buffer)) 'gdb-filter)
--- 165,171 ----
(setq default-directory (file-name-directory path))
(or (bolp) (newline))
(insert "Current directory is " default-directory "\n")
! (make-comint (concat "gdb-" file) gdb-command-name nil "-fullname"
"-cd" default-directory file)
(gdb-mode)
(set-process-filter (get-buffer-process (current-buffer)) 'gdb-filter)