;; This file is part of GNU Emacs.
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
(with-current-buffer gud-comint-buffer
(if (string-equal gud-target-name "emacs")
(comint-stop-subjob)
- (comint-interrupt-subjob))))
+ (if (eq gud-minor-mode 'jdb)
+ (gud-call "suspend")
+ (comint-interrupt-subjob)))))
(easy-mmode-defmap gud-menu-map
'(([help] "Info (debugger)" . gud-goto-info)
((memq minor-mode '(gdbmi gdba))
(erase-buffer)
(insert "Watch Expressions:\n")
- (if gdb-speedbar-auto-raise
- (raise-frame speedbar-frame))
(let ((var-list gdb-var-list) parent)
(while var-list
(let* (char (depth 0) (start 0) (var (car var-list))
(string-match "^#\\([0-9]+\\) +[0-9a-fx]+ in \\([:0-9a-zA-Z_]+\\) (" e)
(string-match "^#\\([0-9]+\\) +\\([:0-9a-zA-Z_]+\\) (" e)))
(if (not (string-match
- "at \\([-0-9a-zA-Z_.]+\\):\\([0-9]+\\)$" e))
+ "at \\([-0-9a-zA-Z_/.]+\\):\\([0-9]+\\)$" e))
nil
(setcar newlst
(list (nth 0 (car newlst))
(setq newlst
(cons
(if (string-match
- "at \\([-0-9a-zA-Z_.]+\\):\\([0-9]+\\)$" e)
+ "at \\([-0-9a-zA-Z_/.]+\\):\\([0-9]+\\)$" e)
(list name num (match-string 1 e)
(match-string 2 e))
(list name num))
:group 'gud
:type 'boolean)
+(declare-function tramp-file-name-localname "tramp" (vec))
+(declare-function tramp-dissect-file-name "tramp" (name &optional nodefault))
+
;; Perform initializations common to all debuggers.
;; The first arg is the specified command line,
;; which starts with the program to debug.
(if w
(setcar w
(if (file-remote-p default-directory)
- (setq file (file-name-nondirectory file))
+ ;; Tramp has already been loaded if we are here.
+ (setq file (tramp-file-name-localname
+ (tramp-dissect-file-name file)))
file))))
(apply 'make-comint (concat "gud" filepart) program nil
(if massage-args (funcall massage-args file args) args))
(window (and buffer
(or (get-buffer-window buffer)
(if (memq gud-minor-mode '(gdbmi gdba))
- (or (if (get-buffer-window buffer 0)
- (display-buffer buffer nil 0))
+ (or (if (get-buffer-window buffer 'visible)
+ (display-buffer buffer nil 'visible))
(unless (gdb-display-source-buffer buffer)
- (gdb-display-buffer buffer nil))))
+ (gdb-display-buffer buffer nil 'visible))))
(display-buffer buffer))))
(pos))
(if buffer
(kill-local-variable 'gud-tooltip-mouse-motions-active)
(kill-local-variable 'track-mouse))))
+(defvar tooltip-last-mouse-motion-event)
+(declare-function tooltip-hide "tooltip" (&optional ignored-arg))
+(declare-function tooltip-start-delayed-tip "tooltip" ())
+
(defun gud-tooltip-mouse-motion (event)
"Command handler for mouse movement events in `global-map'."
(interactive "e")
(define-obsolete-function-alias 'tooltip-gud-toggle-dereference
'gud-tooltip-dereference "22.1")
+(defvar tooltip-use-echo-area)
+(declare-function tooltip-show "tooltip" (text &optional use-echo-area))
+(declare-function tooltip-strip-prompt "tooltip" (process output))
; This will only display data that comes in one chunk.
; Larger arrays (say 400 elements) are displayed in
(sdb (concat expr "/"))))
(declare-function gdb-enqueue-input "gdb-ui" (item))
+(declare-function tooltip-expr-to-print "tooltip" (event))
+(declare-function tooltip-event-buffer "tooltip" (event))
(defun gud-tooltip-tips (event)
"Show tip for identifier or selection under the mouse.