524 |
(setq gdb-pending-triggers |
(setq gdb-pending-triggers |
525 |
(delq 'gdb-var-update gdb-pending-triggers)) |
(delq 'gdb-var-update gdb-pending-triggers)) |
526 |
(when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) |
(when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) |
527 |
;; dummy command to update speedbar at right time |
;; Dummy command to update speedbar at right time. |
528 |
(gdb-enqueue-input (list "server pwd\n" 'gdb-speedbar-timer-fn)) |
(gdb-enqueue-input (list "server pwd\n" 'gdb-speedbar-timer-fn)) |
529 |
;; keep gdb-pending-triggers non-nil till end |
;; Keep gdb-pending-triggers non-nil till end. |
530 |
(push 'gdb-speedbar-timer gdb-pending-triggers))) |
(push 'gdb-speedbar-timer gdb-pending-triggers))) |
531 |
|
|
532 |
(defun gdb-speedbar-timer-fn () |
(defun gdb-speedbar-timer-fn () |
1023 |
(gdb-invalidate-threads) |
(gdb-invalidate-threads) |
1024 |
(unless (eq system-type 'darwin) ;Breaks on Darwin's GDB-5.3. |
(unless (eq system-type 'darwin) ;Breaks on Darwin's GDB-5.3. |
1025 |
;; FIXME: with GDB-6 on Darwin, this might very well work. |
;; FIXME: with GDB-6 on Darwin, this might very well work. |
1026 |
;; only needed/used with speedbar/watch expressions |
;; Only needed/used with speedbar/watch expressions. |
1027 |
(when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) |
(when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) |
1028 |
(setq gdb-var-changed t) ; force update |
(setq gdb-var-changed t) ; force update |
1029 |
(dolist (var gdb-var-list) |
(dolist (var gdb-var-list) |
1043 |
(if gdb-flush-pending-output |
(if gdb-flush-pending-output |
1044 |
nil |
nil |
1045 |
(if gdb-enable-debug-log (push (cons 'recv string) gdb-debug-log)) |
(if gdb-enable-debug-log (push (cons 'recv string) gdb-debug-log)) |
1046 |
;; Recall the left over gud-marker-acc from last time |
;; Recall the left over gud-marker-acc from last time. |
1047 |
(setq gud-marker-acc (concat gud-marker-acc string)) |
(setq gud-marker-acc (concat gud-marker-acc string)) |
1048 |
;; Start accumulating output for the GUD buffer |
;; Start accumulating output for the GUD buffer. |
1049 |
(let ((output "")) |
(let ((output "")) |
1050 |
;; |
;; |
1051 |
;; Process all the complete markers in this chunk. |
;; Process all the complete markers in this chunk. |
1295 |
:weight bold)) |
:weight bold)) |
1296 |
"Face for enabled breakpoint icon in fringe." |
"Face for enabled breakpoint icon in fringe." |
1297 |
:group 'gud) |
:group 'gud) |
1298 |
;; compatibility alias for old name |
;; Compatibility alias for old name. |
1299 |
(put 'breakpoint-enabled-bitmap-face 'face-alias 'breakpoint-enabled) |
(put 'breakpoint-enabled-bitmap-face 'face-alias 'breakpoint-enabled) |
1300 |
|
|
1301 |
(defface breakpoint-disabled |
(defface breakpoint-disabled |
1306 |
(((background light)) :foreground "grey40")) |
(((background light)) :foreground "grey40")) |
1307 |
"Face for disabled breakpoint icon in fringe." |
"Face for disabled breakpoint icon in fringe." |
1308 |
:group 'gud) |
:group 'gud) |
1309 |
;; compatibility alias for old name |
;; Compatibility alias for old name. |
1310 |
(put 'breakpoint-disabled-bitmap-face 'face-alias 'breakpoint-disabled) |
(put 'breakpoint-disabled-bitmap-face 'face-alias 'breakpoint-disabled) |
1311 |
|
|
1312 |
;;-put breakpoint icons in relevant margins (even those set in the GUD buffer) |
;; Put breakpoint icons in relevant margins (even those set in the GUD buffer). |
1313 |
(defun gdb-info-breakpoints-custom () |
(defun gdb-info-breakpoints-custom () |
1314 |
(let ((flag) (bptno)) |
(let ((flag) (bptno)) |
1315 |
;; remove all breakpoint-icons in source buffers but not assembler buffer |
;; Remove all breakpoint-icons in source buffers but not assembler buffer. |
1316 |
(dolist (buffer (buffer-list)) |
(dolist (buffer (buffer-list)) |
1317 |
(with-current-buffer buffer |
(with-current-buffer buffer |
1318 |
(if (and (eq gud-minor-mode 'gdba) |
(if (and (eq gud-minor-mode 'gdba) |
1342 |
(setq file (cdr (assoc bptno gdb-location-alist)))) |
(setq file (cdr (assoc bptno gdb-location-alist)))) |
1343 |
(if (and file |
(if (and file |
1344 |
(not (string-equal file "File not found"))) |
(not (string-equal file "File not found"))) |
1345 |
(with-current-buffer (find-file-noselect file) |
(with-current-buffer |
1346 |
|
(find-file-noselect file 'nowarn) |
1347 |
(set (make-local-variable 'gud-minor-mode) |
(set (make-local-variable 'gud-minor-mode) |
1348 |
'gdba) |
'gdba) |
1349 |
(set (make-local-variable 'tool-bar-map) |
(set (make-local-variable 'tool-bar-map) |
1350 |
gud-tool-bar-map) |
gud-tool-bar-map) |
1351 |
;; only want one breakpoint icon at each |
;; Only want one breakpoint icon at each |
1352 |
;; location |
;; location. |
1353 |
(save-excursion |
(save-excursion |
1354 |
(goto-line (string-to-number line)) |
(goto-line (string-to-number line)) |
1355 |
(gdb-put-breakpoint-icon (eq flag ?y) bptno))) |
(gdb-put-breakpoint-icon (eq flag ?y) bptno))) |
1389 |
(with-selected-window (posn-window posn) |
(with-selected-window (posn-window posn) |
1390 |
(save-excursion |
(save-excursion |
1391 |
(goto-char (posn-point posn)) |
(goto-char (posn-point posn)) |
1392 |
(if |
(if (posn-object posn) |
|
; (or |
|
|
(posn-object posn) |
|
|
; (eq (car (fringe-bitmaps-at-pos (posn-point posn))) |
|
|
; 'breakpoint)) |
|
1393 |
(gdb-enqueue-input |
(gdb-enqueue-input |
1394 |
(list |
(list |
1395 |
(let ((bptno (get-text-property |
(let ((bptno (get-text-property |
1977 |
'mouse-1 |
'mouse-1 |
1978 |
#'(lambda () (interactive) |
#'(lambda () (interactive) |
1979 |
(let ((gdb-memory-address |
(let ((gdb-memory-address |
1980 |
;; let GDB do the arithmetic |
;; Let GDB do the arithmetic. |
1981 |
(concat |
(concat |
1982 |
gdb-memory-address " - " |
gdb-memory-address " - " |
1983 |
(number-to-string |
(number-to-string |