[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el
From: |
Nick Roberts |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el |
Date: |
Mon, 09 May 2005 17:54:49 -0400 |
Index: emacs/lisp/progmodes/gdb-ui.el
diff -c emacs/lisp/progmodes/gdb-ui.el:1.66 emacs/lisp/progmodes/gdb-ui.el:1.67
*** emacs/lisp/progmodes/gdb-ui.el:1.66 Fri May 6 22:12:34 2005
--- emacs/lisp/progmodes/gdb-ui.el Mon May 9 21:54:47 2005
***************
*** 84,89 ****
--- 84,91 ----
(defvar gdb-find-file-unhook nil)
(defvar gdb-active-process nil "GUD tooltips display variable values when t, \
and #define directives otherwise.")
+ (defvar gdb-macro-info nil
+ "Non-nil if GDB knows that the inferior includes preprocessor macro info.")
(defvar gdb-buffer-type nil
"One of the symbols bound in `gdb-buffer-rules'.")
***************
*** 242,247 ****
--- 244,261 ----
(substring string 0 (- (length string) 1))))
gud-tooltip-echo-area))
+ ;; If expr is a macro for a function don't print because of possible dangerous
+ ;; side-effects. Also printing a function within a tooltip generates an
+ ;; unexpected starting annotation (phase error).
+ (defun gdb-tooltip-print-1 (expr)
+ (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
+ (goto-char (point-min))
+ (if (search-forward "expands to: " nil t)
+ (unless (looking-at "\\S+.*(.*).*")
+ (gdb-enqueue-input
+ (list (concat gdb-server-prefix "print " expr "\n")
+ 'gdb-tooltip-print))))))
+
(defun gdb-set-gud-minor-mode (buffer)
"Set gud-minor-mode from find-file if appropriate."
(goto-char (point-min))
***************
*** 336,341 ****
--- 350,356 ----
(setq gdb-flush-pending-output nil)
(setq gdb-location-alist nil)
(setq gdb-find-file-unhook nil)
+ (setq gdb-macro-info nil)
;;
(setq gdb-buffer-type 'gdba)
;;
***************
*** 1293,1319 ****
help-echo "mouse-2, RET: visit breakpoint"))
(unless (file-exists-p file)
(setq file (cdr (assoc bptno gdb-location-alist))))
! (unless (string-equal file "File not found")
! (if file
! (with-current-buffer (find-file-noselect file)
! (set (make-local-variable 'gud-minor-mode)
! 'gdba)
! (set (make-local-variable 'tool-bar-map)
! gud-tool-bar-map)
! ;; only want one breakpoint icon at each
! ;; location
! (save-excursion
! (goto-line (string-to-number line))
! (gdb-put-breakpoint-icon (eq flag ?y) bptno)))
! (gdb-enqueue-input
! (list
! (concat "list "
! (match-string-no-properties 1) ":1\n")
! 'ignore))
! (gdb-enqueue-input
! (list "info source\n"
! `(lambda () (gdb-get-location
! ,bptno ,line ,flag)))))))))))
(end-of-line)))))
(if (gdb-get-buffer 'gdb-assembler-buffer) (gdb-assembler-custom)))
--- 1308,1334 ----
help-echo "mouse-2, RET: visit breakpoint"))
(unless (file-exists-p file)
(setq file (cdr (assoc bptno gdb-location-alist))))
! (if (and file
! (not (string-equal file "File not found")))
! (with-current-buffer (find-file-noselect file)
! (set (make-local-variable 'gud-minor-mode)
! 'gdba)
! (set (make-local-variable 'tool-bar-map)
! gud-tool-bar-map)
! ;; only want one breakpoint icon at each
! ;; location
! (save-excursion
! (goto-line (string-to-number line))
! (gdb-put-breakpoint-icon (eq flag ?y) bptno)))
! (gdb-enqueue-input
! (list
! (concat "list "
! (match-string-no-properties 1) ":1\n")
! 'ignore))
! (gdb-enqueue-input
! (list "info source\n"
! `(lambda () (gdb-get-location
! ,bptno ,line ,flag))))))))))
(end-of-line)))))
(if (gdb-get-buffer 'gdb-assembler-buffer) (gdb-assembler-custom)))
***************
*** 2221,2226 ****
--- 2236,2244 ----
(if (and (search-forward "Located in " nil t)
(looking-at "\\S-*"))
(setq gdb-main-file (match-string 0)))
+ (goto-char (point-min))
+ (if (search-forward "Includes preprocessor macro info." nil t)
+ (setq gdb-macro-info t))
(if gdb-many-windows
(gdb-setup-windows)
(gdb-get-create-buffer 'gdb-breakpoints-buffer)
***************
*** 2234,2245 ****
(goto-char (point-min))
(catch 'file-not-found
(if (search-forward "Located in " nil t)
! (if (looking-at "\\S-*")
! (push (cons bptno (match-string 0)) gdb-location-alist))
(gdb-resync)
! (push (cons bptno "File not found") gdb-location-alist)
! (message-box "Cannot find source file for breakpoint location.\n\
! Add directory to search path for source files using the GDB command, dir.")
(throw 'file-not-found nil))
(with-current-buffer
(find-file-noselect (match-string 0))
--- 2252,2265 ----
(goto-char (point-min))
(catch 'file-not-found
(if (search-forward "Located in " nil t)
! (when (looking-at "\\S-*")
! (delete (cons bptno "File not found") gdb-location-alist)
! (push (cons bptno (match-string 0)) gdb-location-alist))
(gdb-resync)
! (unless (assoc bptno gdb-location-alist)
! (push (cons bptno "File not found") gdb-location-alist)
! (message-box "Cannot find source file for breakpoint location.\n\
! Add directory to search path for source files using the GDB command, dir."))
(throw 'file-not-found nil))
(with-current-buffer
(find-file-noselect (match-string 0))
- [Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el, Nick Roberts, 2005/05/03
- [Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el, Nick Roberts, 2005/05/04
- [Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el, Eli Zaretskii, 2005/05/06
- [Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el, Nick Roberts, 2005/05/06
- [Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el,
Nick Roberts <=
- [Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el, Nick Roberts, 2005/05/22
- [Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el, Nick Roberts, 2005/05/23
- [Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el, Nick Roberts, 2005/05/26
- [Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el, Nick Roberts, 2005/05/26
- [Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el, Nick Roberts, 2005/05/27
- [Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el, Nick Roberts, 2005/05/28
- [Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el, Nick Roberts, 2005/05/29
- [Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el, Nick Roberts, 2005/05/30
- [Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el, Nick Roberts, 2005/05/31