aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Roberts <[email protected]>2005-05-22 12:37:24 +0000
committerNick Roberts <[email protected]>2005-05-22 12:37:24 +0000
commit453b7959aeb7581727870f9bfc4f4eb9cd70b350 (patch)
tree7605433d864da83ca4a642ceab2db880fa5cf0ca
parent99fa411654a471fe7320f299821652f0b6e2dd99 (diff)
(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.el23
1 files changed, 12 insertions, 11 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index ba0266de57..9f7f69e346 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -1303,7 +1303,8 @@ static char *magick[] = {
(looking-at "\\(\\S-+\\):\\([0-9]+\\)")
(let ((line (match-string 2)) (buffer-read-only nil)
(file (match-string 1)))
- (add-text-properties (point-at-bol) (point-at-eol)
+ (add-text-properties (line-beginning-position)
+ (line-end-position)
'(mouse-face highlight
help-echo "mouse-2, RET: visit breakpoint"))
(unless (file-exists-p file)
@@ -1504,13 +1505,13 @@ static char *magick[] = {
(let ((buffer-read-only nil))
(goto-char (point-min))
(while (< (point) (point-max))
- (add-text-properties (point-at-bol) (point-at-eol)
+ (add-text-properties (line-beginning-position) (line-end-position)
'(mouse-face highlight
help-echo "mouse-2, RET: Select frame"))
(beginning-of-line)
(when (and (looking-at "^#\\([0-9]+\\)")
(equal (match-string 1) gdb-current-stack-level))
- (put-text-property (point-at-bol) (point-at-eol)
+ (put-text-property (line-beginning-position) (line-end-position)
'face '(:inverse-video t)))
(forward-line 1))))))
@@ -1588,7 +1589,7 @@ static char *magick[] = {
(let ((buffer-read-only nil))
(goto-char (point-min))
(while (< (point) (point-max))
- (add-text-properties (point-at-bol) (point-at-eol)
+ (add-text-properties (line-beginning-position) (line-end-position)
'(mouse-face highlight
help-echo "mouse-2, RET: select thread"))
(forward-line 1)))))
@@ -1974,14 +1975,14 @@ corresponding to the mode line clicked."
(let ((buf (gdb-get-buffer 'gdb-partial-output-buffer)))
(with-current-buffer buf
(goto-char (point-min))
- (while (re-search-forward "^ .*\n" nil t)
+ (while (re-search-forward "^[ }].*\n" nil t)
(replace-match "" nil nil))
(goto-char (point-min))
- (while (re-search-forward "{[-0-9, {}\]*\n" nil t)
- (replace-match "(array);\n" nil nil))
+ (while (re-search-forward "{\\(.*=.*\n\\|\n\\)" nil t)
+ (replace-match "(structure);\n" nil nil))
(goto-char (point-min))
- (while (re-search-forward "{.*=.*\n" nil t)
- (replace-match "(structure);\n" nil nil))))
+ (while (re-search-forward "\\s-*{.*\n" nil t)
+ (replace-match " (array);\n" nil nil))))
(let ((buf (gdb-get-buffer 'gdb-locals-buffer)))
(and buf (with-current-buffer buf
(let ((p (point))
@@ -2316,8 +2317,8 @@ BUFFER nil or omitted means use the current buffer."
(delete-overlay overlay))))
(defun gdb-put-breakpoint-icon (enabled bptno)
- (let ((start (progn (beginning-of-line) (- (point) 1)))
- (end (progn (end-of-line) (+ (point) 1)))
+ (let ((start (- (line-beginning-position) 1))
+ (end (+ (line-end-position) 1))
(putstring (if enabled "B" "b")))
(add-text-properties
0 1 '(help-echo "mouse-1: set/clear bkpt, mouse-3: enable/disable bkpt")