diff options
| author | Nick Roberts | 2005-05-22 12:37:24 +0000 |
|---|---|---|
| committer | Nick Roberts | 2005-05-22 12:37:24 +0000 |
| commit | 453b7959aeb7581727870f9bfc4f4eb9cd70b350 (patch) | |
| tree | 7605433d864da83ca4a642ceab2db880fa5cf0ca | |
| parent | 99fa411654a471fe7320f299821652f0b6e2dd99 (diff) | |
| download | emacs-453b7959aeb7581727870f9bfc4f4eb9cd70b350.tar.gz emacs-453b7959aeb7581727870f9bfc4f4eb9cd70b350.zip | |
(gdb-info-locals-handler): Make regexps
more general and work when GDB variable "print pretty" is on,
as with Emacs, for example.
| -rw-r--r-- | lisp/progmodes/gdb-ui.el | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index ba0266de574..9f7f69e346d 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -1303,7 +1303,8 @@ static char *magick[] = { | |||
| 1303 | (looking-at "\\(\\S-+\\):\\([0-9]+\\)") | 1303 | (looking-at "\\(\\S-+\\):\\([0-9]+\\)") |
| 1304 | (let ((line (match-string 2)) (buffer-read-only nil) | 1304 | (let ((line (match-string 2)) (buffer-read-only nil) |
| 1305 | (file (match-string 1))) | 1305 | (file (match-string 1))) |
| 1306 | (add-text-properties (point-at-bol) (point-at-eol) | 1306 | (add-text-properties (line-beginning-position) |
| 1307 | (line-end-position) | ||
| 1307 | '(mouse-face highlight | 1308 | '(mouse-face highlight |
| 1308 | help-echo "mouse-2, RET: visit breakpoint")) | 1309 | help-echo "mouse-2, RET: visit breakpoint")) |
| 1309 | (unless (file-exists-p file) | 1310 | (unless (file-exists-p file) |
| @@ -1504,13 +1505,13 @@ static char *magick[] = { | |||
| 1504 | (let ((buffer-read-only nil)) | 1505 | (let ((buffer-read-only nil)) |
| 1505 | (goto-char (point-min)) | 1506 | (goto-char (point-min)) |
| 1506 | (while (< (point) (point-max)) | 1507 | (while (< (point) (point-max)) |
| 1507 | (add-text-properties (point-at-bol) (point-at-eol) | 1508 | (add-text-properties (line-beginning-position) (line-end-position) |
| 1508 | '(mouse-face highlight | 1509 | '(mouse-face highlight |
| 1509 | help-echo "mouse-2, RET: Select frame")) | 1510 | help-echo "mouse-2, RET: Select frame")) |
| 1510 | (beginning-of-line) | 1511 | (beginning-of-line) |
| 1511 | (when (and (looking-at "^#\\([0-9]+\\)") | 1512 | (when (and (looking-at "^#\\([0-9]+\\)") |
| 1512 | (equal (match-string 1) gdb-current-stack-level)) | 1513 | (equal (match-string 1) gdb-current-stack-level)) |
| 1513 | (put-text-property (point-at-bol) (point-at-eol) | 1514 | (put-text-property (line-beginning-position) (line-end-position) |
| 1514 | 'face '(:inverse-video t))) | 1515 | 'face '(:inverse-video t))) |
| 1515 | (forward-line 1)))))) | 1516 | (forward-line 1)))))) |
| 1516 | 1517 | ||
| @@ -1588,7 +1589,7 @@ static char *magick[] = { | |||
| 1588 | (let ((buffer-read-only nil)) | 1589 | (let ((buffer-read-only nil)) |
| 1589 | (goto-char (point-min)) | 1590 | (goto-char (point-min)) |
| 1590 | (while (< (point) (point-max)) | 1591 | (while (< (point) (point-max)) |
| 1591 | (add-text-properties (point-at-bol) (point-at-eol) | 1592 | (add-text-properties (line-beginning-position) (line-end-position) |
| 1592 | '(mouse-face highlight | 1593 | '(mouse-face highlight |
| 1593 | help-echo "mouse-2, RET: select thread")) | 1594 | help-echo "mouse-2, RET: select thread")) |
| 1594 | (forward-line 1))))) | 1595 | (forward-line 1))))) |
| @@ -1974,14 +1975,14 @@ corresponding to the mode line clicked." | |||
| 1974 | (let ((buf (gdb-get-buffer 'gdb-partial-output-buffer))) | 1975 | (let ((buf (gdb-get-buffer 'gdb-partial-output-buffer))) |
| 1975 | (with-current-buffer buf | 1976 | (with-current-buffer buf |
| 1976 | (goto-char (point-min)) | 1977 | (goto-char (point-min)) |
| 1977 | (while (re-search-forward "^ .*\n" nil t) | 1978 | (while (re-search-forward "^[ }].*\n" nil t) |
| 1978 | (replace-match "" nil nil)) | 1979 | (replace-match "" nil nil)) |
| 1979 | (goto-char (point-min)) | 1980 | (goto-char (point-min)) |
| 1980 | (while (re-search-forward "{[-0-9, {}\]*\n" nil t) | 1981 | (while (re-search-forward "{\\(.*=.*\n\\|\n\\)" nil t) |
| 1981 | (replace-match "(array);\n" nil nil)) | 1982 | (replace-match "(structure);\n" nil nil)) |
| 1982 | (goto-char (point-min)) | 1983 | (goto-char (point-min)) |
| 1983 | (while (re-search-forward "{.*=.*\n" nil t) | 1984 | (while (re-search-forward "\\s-*{.*\n" nil t) |
| 1984 | (replace-match "(structure);\n" nil nil)))) | 1985 | (replace-match " (array);\n" nil nil)))) |
| 1985 | (let ((buf (gdb-get-buffer 'gdb-locals-buffer))) | 1986 | (let ((buf (gdb-get-buffer 'gdb-locals-buffer))) |
| 1986 | (and buf (with-current-buffer buf | 1987 | (and buf (with-current-buffer buf |
| 1987 | (let ((p (point)) | 1988 | (let ((p (point)) |
| @@ -2316,8 +2317,8 @@ BUFFER nil or omitted means use the current buffer." | |||
| 2316 | (delete-overlay overlay)))) | 2317 | (delete-overlay overlay)))) |
| 2317 | 2318 | ||
| 2318 | (defun gdb-put-breakpoint-icon (enabled bptno) | 2319 | (defun gdb-put-breakpoint-icon (enabled bptno) |
| 2319 | (let ((start (progn (beginning-of-line) (- (point) 1))) | 2320 | (let ((start (- (line-beginning-position) 1)) |
| 2320 | (end (progn (end-of-line) (+ (point) 1))) | 2321 | (end (+ (line-end-position) 1)) |
| 2321 | (putstring (if enabled "B" "b"))) | 2322 | (putstring (if enabled "B" "b"))) |
| 2322 | (add-text-properties | 2323 | (add-text-properties |
| 2323 | 0 1 '(help-echo "mouse-1: set/clear bkpt, mouse-3: enable/disable bkpt") | 2324 | 0 1 '(help-echo "mouse-1: set/clear bkpt, mouse-3: enable/disable bkpt") |