comparison lisp/progmodes/gud.el @ 91204:53108e6cea98

Merge from emacs--devo--0 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-294
author Miles Bader <miles@gnu.org>
date Thu, 06 Dec 2007 09:51:45 +0000
parents 880960b70474 087d581b50f6
children 606f2d163a64
comparison
equal deleted inserted replaced
91203:db40129142b2 91204:53108e6cea98
315 (if (file-exists-p path) 315 (if (file-exists-p path)
316 (setq result path 316 (setq result path
317 directories nil))) 317 directories nil)))
318 (setq directories (cdr directories))) 318 (setq directories (cdr directories)))
319 result))) 319 result)))
320
321 (declare-function gdb-create-define-alist "gdb-ui" ())
320 322
321 (defun gud-find-file (file) 323 (defun gud-find-file (file)
322 ;; Don't get confused by double slashes in the name that comes from GDB. 324 ;; Don't get confused by double slashes in the name that comes from GDB.
323 (while (string-match "//+" file) 325 (while (string-match "//+" file)
324 (setq file (replace-match "/" t t file))) 326 (setq file (replace-match "/" t t file)))
707 (defvar gdb-first-prompt t) 709 (defvar gdb-first-prompt t)
708 710
709 (defvar gud-filter-pending-text nil 711 (defvar gud-filter-pending-text nil
710 "Non-nil means this is text that has been saved for later in `gud-filter'.") 712 "Non-nil means this is text that has been saved for later in `gud-filter'.")
711 713
714 ;; If in gdba mode, gdb-ui is loaded.
715 (declare-function gdb-restore-windows "gdb-ui" ())
716
712 ;; The old gdb command (text command mode). The new one is in gdb-ui.el. 717 ;; The old gdb command (text command mode). The new one is in gdb-ui.el.
713 ;;;###autoload 718 ;;;###autoload
714 (defun gud-gdb (command-line) 719 (defun gud-gdb (command-line)
715 "Run gdb on program FILE in buffer *gud-FILE*. 720 "Run gdb on program FILE in buffer *gud-FILE*.
716 The directory containing FILE becomes the initial working 721 The directory containing FILE becomes the initial working
2595 2600
2596 (defvar gud-minor-mode-type nil) 2601 (defvar gud-minor-mode-type nil)
2597 (defvar gud-overlay-arrow-position nil) 2602 (defvar gud-overlay-arrow-position nil)
2598 (add-to-list 'overlay-arrow-variable-list 'gud-overlay-arrow-position) 2603 (add-to-list 'overlay-arrow-variable-list 'gud-overlay-arrow-position)
2599 2604
2605 (declare-function gdb-reset "gdb-ui" ())
2606
2600 (defun gud-sentinel (proc msg) 2607 (defun gud-sentinel (proc msg)
2601 (cond ((null (buffer-name (process-buffer proc))) 2608 (cond ((null (buffer-name (process-buffer proc)))
2602 ;; buffer killed 2609 ;; buffer killed
2603 ;; Stop displaying an arrow in a source file. 2610 ;; Stop displaying an arrow in a source file.
2604 (setq gud-overlay-arrow-position nil) 2611 (setq gud-overlay-arrow-position nil)
2663 (when gud-last-frame 2670 (when gud-last-frame
2664 (gud-set-buffer) 2671 (gud-set-buffer)
2665 (gud-display-line (car gud-last-frame) (cdr gud-last-frame)) 2672 (gud-display-line (car gud-last-frame) (cdr gud-last-frame))
2666 (setq gud-last-last-frame gud-last-frame 2673 (setq gud-last-last-frame gud-last-frame
2667 gud-last-frame nil))) 2674 gud-last-frame nil)))
2675
2676 (declare-function global-hl-line-highlight "hl-line" ())
2677 (declare-function hl-line-highlight "hl-line" ())
2678 (declare-function gdb-display-source-buffer "gdb-ui" (buffer))
2679 (declare-function gdb-display-buffer "gdb-ui" (buf dedicated &optional size))
2668 2680
2669 ;; Make sure the file named TRUE-FILE is in a buffer that appears on the screen 2681 ;; Make sure the file named TRUE-FILE is in a buffer that appears on the screen
2670 ;; and that its line LINE is visible. 2682 ;; and that its line LINE is visible.
2671 ;; Put the overlay-arrow on the line LINE in that buffer. 2683 ;; Put the overlay-arrow on the line LINE in that buffer.
2672 ;; Most of the trickiness in here comes from wanting to preserve the current 2684 ;; Most of the trickiness in here comes from wanting to preserve the current
2995 ((= span-start ?]) t) 3007 ((= span-start ?]) t)
2996 ((= span-end ?() t) 3008 ((= span-end ?() t)
2997 ((= span-end ?[) t) 3009 ((= span-end ?[) t)
2998 (t nil))) 3010 (t nil)))
2999 (t nil)))) 3011 (t nil))))
3012
3013
3014 (declare-function c-langelem-sym "cc-defs" (langelem))
3015 (declare-function c-langelem-pos "cc-defs" (langelem))
3016 (declare-function syntax-symbol "gud" (x))
3017 (declare-function syntax-point "gud" (x))
3000 3018
3001 (defun gud-find-class (f line) 3019 (defun gud-find-class (f line)
3002 "Find fully qualified class in file F at line LINE. 3020 "Find fully qualified class in file F at line LINE.
3003 This function uses the `gud-jdb-classpath' (and optional 3021 This function uses the `gud-jdb-classpath' (and optional
3004 `gud-jdb-sourcepath') list(s) to derive a file 3022 `gud-jdb-sourcepath') list(s) to derive a file
3381 (gdba (concat "server print " expr)) 3399 (gdba (concat "server print " expr))
3382 ((dbx gdbmi) (concat "print " expr)) 3400 ((dbx gdbmi) (concat "print " expr))
3383 ((xdb pdb) (concat "p " expr)) 3401 ((xdb pdb) (concat "p " expr))
3384 (sdb (concat expr "/")))) 3402 (sdb (concat expr "/"))))
3385 3403
3404 (declare-function gdb-enqueue-input "gdb-ui" (item))
3405
3386 (defun gud-tooltip-tips (event) 3406 (defun gud-tooltip-tips (event)
3387 "Show tip for identifier or selection under the mouse. 3407 "Show tip for identifier or selection under the mouse.
3388 The mouse must either point at an identifier or inside a selected 3408 The mouse must either point at an identifier or inside a selected
3389 region for the tip window to be shown. If gud-tooltip-dereference is t, 3409 region for the tip window to be shown. If gud-tooltip-dereference is t,
3390 add a `*' in front of the printed expression. In the case of a C program 3410 add a `*' in front of the printed expression. In the case of a C program