aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Roberts2003-08-11 21:55:20 +0000
committerNick Roberts2003-08-11 21:55:20 +0000
commit2ff0458dd09c436468f68e8dbf02b29560704d59 (patch)
tree550d898ef4c9aca3e3a3a95c617821d0a6dc407b
parent87911c22a46293757d8a451b9763e7a6b833d168 (diff)
downloademacs-2ff0458dd09c436468f68e8dbf02b29560704d59.tar.gz
emacs-2ff0458dd09c436468f68e8dbf02b29560704d59.zip
(gdb-insert-field, gdb-array-format1)
(gdb-info-breakpoints-custom, gdb-info-frames-custom) (gdb-info-threads-custom): Add help-echo text. (gdb-display-back): Don't use purecopy. (gdb-info-breakpoints-custom, gdb-reset) (gdb-assembler-custom): Use display-images-p to test if breakpoint icons can be displayed.
-rw-r--r--lisp/gdb-ui.el56
1 files changed, 26 insertions, 30 deletions
diff --git a/lisp/gdb-ui.el b/lisp/gdb-ui.el
index 08d5e901c73..c49be50d8b7 100644
--- a/lisp/gdb-ui.el
+++ b/lisp/gdb-ui.el
@@ -817,7 +817,7 @@ output from the current command if that happens to be appropriate."
817 (setq gdb-display-in-progress nil)) 817 (setq gdb-display-in-progress nil))
818 818
819(define-button-type 'gdb-display-back 819(define-button-type 'gdb-display-back
820 'help-echo (purecopy "mouse-2, RET: go back to previous display buffer") 820 'help-echo "mouse-2, RET: go back to previous display buffer"
821 'action (lambda (button) (gdb-display-go-back))) 821 'action (lambda (button) (gdb-display-go-back)))
822 822
823(defun gdb-display-go-back () 823(defun gdb-display-go-back ()
@@ -945,10 +945,8 @@ output from the current command if that happens to be appropriate."
945 (insert-buffer-substring (gdb-get-buffer 945 (insert-buffer-substring (gdb-get-buffer
946 'gdb-partial-output-buffer) 946 'gdb-partial-output-buffer)
947 start end) 947 start end)
948 (put-text-property (- (point) (- end start)) (- (point) 1) 948 (add-text-properties (- (point) (- end start)) (- (point) 1)
949 'mouse-face 'highlight) 949 `(mouse-face highlight local-map ,gdb-dive-map))))
950 (put-text-property (- (point) (- end start)) (- (point) 1)
951 'local-map gdb-dive-map)))
952 (delete-region start end))) 950 (delete-region start end)))
953 951
954(defvar gdb-values nil) 952(defvar gdb-values nil)
@@ -1060,12 +1058,11 @@ output from the current command if that happens to be appropriate."
1060 (setq array-stop (int-to-string (aref gdb-array-stop num))) 1058 (setq array-stop (int-to-string (aref gdb-array-stop num)))
1061 (setq array-range (concat "[" array-start 1059 (setq array-range (concat "[" array-start
1062 ":" array-stop "]")) 1060 ":" array-stop "]"))
1063 (put-text-property 1 (+ (length array-start) 1061 (add-text-properties
1064 (length array-stop) 2) 1062 1 (+ (length array-start) (length array-stop) 2)
1065 'mouse-face 'highlight array-range) 1063 `(mouse-face highlight
1066 (put-text-property 1 (+ (length array-start) 1064 local-map ,gdb-array-slice-map
1067 (length array-stop) 2) 1065 help-echo "mouse-2, RET: select slice for this index") array-range)
1068 'local-map gdb-array-slice-map array-range)
1069 (goto-char (point-min)) 1066 (goto-char (point-min))
1070 (setq array-slice (concat array-slice array-range)) 1067 (setq array-slice (concat array-slice array-range))
1071 (setq num (+ num 1))) 1068 (setq num (+ num 1)))
@@ -1342,7 +1339,7 @@ static char *magick[] = {
1342 (with-current-buffer buffer 1339 (with-current-buffer buffer
1343 (if (and (eq gud-minor-mode 'gdba) 1340 (if (and (eq gud-minor-mode 'gdba)
1344 (not (string-match "^\*" (buffer-name)))) 1341 (not (string-match "^\*" (buffer-name))))
1345 (if (eq window-system 'x) 1342 (if (display-images-p)
1346 (remove-images (point-min) (point-max)) 1343 (remove-images (point-min) (point-max))
1347 (gdb-remove-strings (point-min) (point-max)))))) 1344 (gdb-remove-strings (point-min) (point-max))))))
1348 (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer) 1345 (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer)
@@ -1360,9 +1357,9 @@ static char *magick[] = {
1360 (looking-at "\\(\\S-*\\):\\([0-9]+\\)") 1357 (looking-at "\\(\\S-*\\):\\([0-9]+\\)")
1361 (let ((line (match-string 2)) (buffer-read-only nil) 1358 (let ((line (match-string 2)) (buffer-read-only nil)
1362 (file (match-string 1))) 1359 (file (match-string 1)))
1363 (put-text-property (progn (beginning-of-line) (point)) 1360 (add-text-properties (point-at-bol) (point-at-eol)
1364 (progn (end-of-line) (point)) 1361 '(mouse-face highlight
1365 'mouse-face 'highlight) 1362 help-echo "mouse-2, RET: visit breakpoint"))
1366 (with-current-buffer 1363 (with-current-buffer
1367 (find-file-noselect 1364 (find-file-noselect
1368 (if (file-exists-p file) file 1365 (if (file-exists-p file) file
@@ -1383,7 +1380,7 @@ static char *magick[] = {
1383 (let ((start (progn (beginning-of-line) 1380 (let ((start (progn (beginning-of-line)
1384 (- (point) 1))) 1381 (- (point) 1)))
1385 (end (progn (end-of-line) (+ (point) 1)))) 1382 (end (progn (end-of-line) (+ (point) 1))))
1386 (if (eq window-system 'x) 1383 (if (display-images-p)
1387 (progn 1384 (progn
1388 (remove-images start end) 1385 (remove-images start end)
1389 (if (eq ?y flag) 1386 (if (eq ?y flag)
@@ -1544,18 +1541,17 @@ current line."
1544 (let ((buffer-read-only nil)) 1541 (let ((buffer-read-only nil))
1545 (goto-char (point-min)) 1542 (goto-char (point-min))
1546 (while (< (point) (point-max)) 1543 (while (< (point) (point-max))
1547 (put-text-property (progn (beginning-of-line) (point)) 1544 (add-text-properties (point-at-bol) (point-at-eol)
1548 (progn (end-of-line) (point)) 1545 '(mouse-face highlight
1549 'mouse-face 'highlight) 1546 help-echo "mouse-2, RET: Select frame"))
1550 (beginning-of-line) 1547 (beginning-of-line)
1551 (if (or (looking-at "^#[0-9]*\\s-*\\S-* in \\(\\S-*\\)") 1548 (if (or (looking-at "^#[0-9]*\\s-*\\S-* in \\(\\S-*\\)")
1552 (looking-at "^#[0-9]*\\s-*\\(\\S-*\\)")) 1549 (looking-at "^#[0-9]*\\s-*\\(\\S-*\\)"))
1553 (if (equal (match-string 1) gdb-current-frame) 1550 (if (equal (match-string 1) gdb-current-frame)
1554 (put-text-property (progn (beginning-of-line) (point)) 1551 (put-text-property (point-at-bol) (point-at-eol)
1555 (progn (end-of-line) (point)) 1552 'face
1556 'face 1553 `(:background ,(face-attribute 'default :foreground)
1557 `(:background ,(face-attribute 'default :foreground) 1554 :foreground ,(face-attribute 'default :background)))))
1558 :foreground ,(face-attribute 'default :background)))))
1559 (forward-line 1)))))) 1555 (forward-line 1))))))
1560 1556
1561(defun gdb-stack-buffer-name () 1557(defun gdb-stack-buffer-name ()
@@ -1629,9 +1625,9 @@ the source buffer."
1629 (let ((buffer-read-only nil)) 1625 (let ((buffer-read-only nil))
1630 (goto-char (point-min)) 1626 (goto-char (point-min))
1631 (while (< (point) (point-max)) 1627 (while (< (point) (point-max))
1632 (put-text-property (progn (beginning-of-line) (point)) 1628 (add-text-properties (point-at-bol) (point-at-eol)
1633 (progn (end-of-line) (point)) 1629 '(mouse-face highlight
1634 'mouse-face 'highlight) 1630 help-echo "mouse-2, RET: select thread"))
1635 (forward-line 1))))) 1631 (forward-line 1)))))
1636 1632
1637(defun gdb-threads-buffer-name () 1633(defun gdb-threads-buffer-name ()
@@ -2160,7 +2156,7 @@ This arrangement depends on the value of `gdb-many-windows'."
2160 (if (eq gud-minor-mode 'gdba) 2156 (if (eq gud-minor-mode 'gdba)
2161 (if (string-match "^\*.+*$" (buffer-name)) 2157 (if (string-match "^\*.+*$" (buffer-name))
2162 (kill-buffer nil) 2158 (kill-buffer nil)
2163 (if (eq window-system 'x) 2159 (if (display-images-p)
2164 (remove-images (point-min) (point-max)) 2160 (remove-images (point-min) (point-max))
2165 (gdb-remove-strings (point-min) (point-max))) 2161 (gdb-remove-strings (point-min) (point-max)))
2166 (setq left-margin-width 0) 2162 (setq left-margin-width 0)
@@ -2323,7 +2319,7 @@ BUFFER nil or omitted means use the current buffer."
2323 (setq gdb-arrow-position (point)) 2319 (setq gdb-arrow-position (point))
2324 (gdb-put-arrow "=>" (point)))))) 2320 (gdb-put-arrow "=>" (point))))))
2325 ;; remove all breakpoint-icons in assembler buffer before updating. 2321 ;; remove all breakpoint-icons in assembler buffer before updating.
2326 (if (eq window-system 'x) 2322 (if (display-images-p)
2327 (remove-images (point-min) (point-max)) 2323 (remove-images (point-min) (point-max))
2328 (gdb-remove-strings (point-min) (point-max)))) 2324 (gdb-remove-strings (point-min) (point-max))))
2329 (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer) 2325 (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer)
@@ -2344,7 +2340,7 @@ BUFFER nil or omitted means use the current buffer."
2344 (if (re-search-forward address nil t) 2340 (if (re-search-forward address nil t)
2345 (let ((start (progn (beginning-of-line) (- (point) 1))) 2341 (let ((start (progn (beginning-of-line) (- (point) 1)))
2346 (end (progn (end-of-line) (+ (point) 1)))) 2342 (end (progn (end-of-line) (+ (point) 1))))
2347 (if (eq window-system 'x) 2343 (if (display-images-p)
2348 (progn 2344 (progn
2349 (remove-images start end) 2345 (remove-images start end)
2350 (if (eq ?y flag) 2346 (if (eq ?y flag)