aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Roberts2005-07-28 02:38:59 +0000
committerNick Roberts2005-07-28 02:38:59 +0000
commit0fc895004ba5fd79cd7d9c137d16889cddb33571 (patch)
tree5bac512f8130dfa93699b5b92ac527ab50d1d3ef
parent8aa9ad9fbd8d29ff8da893206f7ff1229272dcb6 (diff)
downloademacs-0fc895004ba5fd79cd7d9c137d16889cddb33571.tar.gz
emacs-0fc895004ba5fd79cd7d9c137d16889cddb33571.zip
Smarten comments.
(gdb-info-breakpoints-custom): Use nowarn when finding file.
-rw-r--r--lisp/progmodes/gdb-ui.el33
1 files changed, 15 insertions, 18 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 8a426a37365..8e574e912c6 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -524,9 +524,9 @@ Also display the main routine in the disassembly buffer if present."
524 (setq gdb-pending-triggers 524 (setq gdb-pending-triggers
525 (delq 'gdb-var-update gdb-pending-triggers)) 525 (delq 'gdb-var-update gdb-pending-triggers))
526 (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) 526 (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
527 ;; dummy command to update speedbar at right time 527 ;; Dummy command to update speedbar at right time.
528 (gdb-enqueue-input (list "server pwd\n" 'gdb-speedbar-timer-fn)) 528 (gdb-enqueue-input (list "server pwd\n" 'gdb-speedbar-timer-fn))
529 ;; keep gdb-pending-triggers non-nil till end 529 ;; Keep gdb-pending-triggers non-nil till end.
530 (push 'gdb-speedbar-timer gdb-pending-triggers))) 530 (push 'gdb-speedbar-timer gdb-pending-triggers)))
531 531
532(defun gdb-speedbar-timer-fn () 532(defun gdb-speedbar-timer-fn ()
@@ -1023,7 +1023,7 @@ happens to be appropriate."
1023 (gdb-invalidate-threads) 1023 (gdb-invalidate-threads)
1024 (unless (eq system-type 'darwin) ;Breaks on Darwin's GDB-5.3. 1024 (unless (eq system-type 'darwin) ;Breaks on Darwin's GDB-5.3.
1025 ;; FIXME: with GDB-6 on Darwin, this might very well work. 1025 ;; FIXME: with GDB-6 on Darwin, this might very well work.
1026 ;; only needed/used with speedbar/watch expressions 1026 ;; Only needed/used with speedbar/watch expressions.
1027 (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) 1027 (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
1028 (setq gdb-var-changed t) ; force update 1028 (setq gdb-var-changed t) ; force update
1029 (dolist (var gdb-var-list) 1029 (dolist (var gdb-var-list)
@@ -1043,9 +1043,9 @@ happens to be appropriate."
1043 (if gdb-flush-pending-output 1043 (if gdb-flush-pending-output
1044 nil 1044 nil
1045 (if gdb-enable-debug-log (push (cons 'recv string) gdb-debug-log)) 1045 (if gdb-enable-debug-log (push (cons 'recv string) gdb-debug-log))
1046 ;; Recall the left over gud-marker-acc from last time 1046 ;; Recall the left over gud-marker-acc from last time.
1047 (setq gud-marker-acc (concat gud-marker-acc string)) 1047 (setq gud-marker-acc (concat gud-marker-acc string))
1048 ;; Start accumulating output for the GUD buffer 1048 ;; Start accumulating output for the GUD buffer.
1049 (let ((output "")) 1049 (let ((output ""))
1050 ;; 1050 ;;
1051 ;; Process all the complete markers in this chunk. 1051 ;; Process all the complete markers in this chunk.
@@ -1295,7 +1295,7 @@ static char *magick[] = {
1295 :weight bold)) 1295 :weight bold))
1296 "Face for enabled breakpoint icon in fringe." 1296 "Face for enabled breakpoint icon in fringe."
1297 :group 'gud) 1297 :group 'gud)
1298;; compatibility alias for old name 1298;; Compatibility alias for old name.
1299(put 'breakpoint-enabled-bitmap-face 'face-alias 'breakpoint-enabled) 1299(put 'breakpoint-enabled-bitmap-face 'face-alias 'breakpoint-enabled)
1300 1300
1301(defface breakpoint-disabled 1301(defface breakpoint-disabled
@@ -1306,13 +1306,13 @@ static char *magick[] = {
1306 (((background light)) :foreground "grey40")) 1306 (((background light)) :foreground "grey40"))
1307 "Face for disabled breakpoint icon in fringe." 1307 "Face for disabled breakpoint icon in fringe."
1308 :group 'gud) 1308 :group 'gud)
1309;; compatibility alias for old name 1309;; Compatibility alias for old name.
1310(put 'breakpoint-disabled-bitmap-face 'face-alias 'breakpoint-disabled) 1310(put 'breakpoint-disabled-bitmap-face 'face-alias 'breakpoint-disabled)
1311 1311
1312;;-put breakpoint icons in relevant margins (even those set in the GUD buffer) 1312;; Put breakpoint icons in relevant margins (even those set in the GUD buffer).
1313(defun gdb-info-breakpoints-custom () 1313(defun gdb-info-breakpoints-custom ()
1314 (let ((flag) (bptno)) 1314 (let ((flag) (bptno))
1315 ;; remove all breakpoint-icons in source buffers but not assembler buffer 1315 ;; Remove all breakpoint-icons in source buffers but not assembler buffer.
1316 (dolist (buffer (buffer-list)) 1316 (dolist (buffer (buffer-list))
1317 (with-current-buffer buffer 1317 (with-current-buffer buffer
1318 (if (and (eq gud-minor-mode 'gdba) 1318 (if (and (eq gud-minor-mode 'gdba)
@@ -1342,13 +1342,14 @@ static char *magick[] = {
1342 (setq file (cdr (assoc bptno gdb-location-alist)))) 1342 (setq file (cdr (assoc bptno gdb-location-alist))))
1343 (if (and file 1343 (if (and file
1344 (not (string-equal file "File not found"))) 1344 (not (string-equal file "File not found")))
1345 (with-current-buffer (find-file-noselect file) 1345 (with-current-buffer
1346 (find-file-noselect file 'nowarn)
1346 (set (make-local-variable 'gud-minor-mode) 1347 (set (make-local-variable 'gud-minor-mode)
1347 'gdba) 1348 'gdba)
1348 (set (make-local-variable 'tool-bar-map) 1349 (set (make-local-variable 'tool-bar-map)
1349 gud-tool-bar-map) 1350 gud-tool-bar-map)
1350 ;; only want one breakpoint icon at each 1351 ;; Only want one breakpoint icon at each
1351 ;; location 1352 ;; location.
1352 (save-excursion 1353 (save-excursion
1353 (goto-line (string-to-number line)) 1354 (goto-line (string-to-number line))
1354 (gdb-put-breakpoint-icon (eq flag ?y) bptno))) 1355 (gdb-put-breakpoint-icon (eq flag ?y) bptno)))
@@ -1388,11 +1389,7 @@ static char *magick[] = {
1388 (with-selected-window (posn-window posn) 1389 (with-selected-window (posn-window posn)
1389 (save-excursion 1390 (save-excursion
1390 (goto-char (posn-point posn)) 1391 (goto-char (posn-point posn))
1391 (if 1392 (if (posn-object posn)
1392; (or
1393 (posn-object posn)
1394; (eq (car (fringe-bitmaps-at-pos (posn-point posn)))
1395; 'breakpoint))
1396 (gdb-enqueue-input 1393 (gdb-enqueue-input
1397 (list 1394 (list
1398 (let ((bptno (get-text-property 1395 (let ((bptno (get-text-property
@@ -1980,7 +1977,7 @@ corresponding to the mode line clicked."
1980 'mouse-1 1977 'mouse-1
1981 #'(lambda () (interactive) 1978 #'(lambda () (interactive)
1982 (let ((gdb-memory-address 1979 (let ((gdb-memory-address
1983 ;; let GDB do the arithmetic 1980 ;; Let GDB do the arithmetic.
1984 (concat 1981 (concat
1985 gdb-memory-address " - " 1982 gdb-memory-address " - "
1986 (number-to-string 1983 (number-to-string