[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el
From: |
Nick Roberts |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el |
Date: |
Thu, 20 Apr 2006 22:57:03 +0000 |
Index: emacs/lisp/progmodes/gdb-ui.el
diff -u emacs/lisp/progmodes/gdb-ui.el:1.162
emacs/lisp/progmodes/gdb-ui.el:1.163
--- emacs/lisp/progmodes/gdb-ui.el:1.162 Mon Apr 17 19:48:50 2006
+++ emacs/lisp/progmodes/gdb-ui.el Thu Apr 20 22:57:03 2006
@@ -3294,6 +3294,7 @@
(with-current-buffer (gdb-get-buffer 'gdb-registers-buffer)
(let ((buffer-read-only nil))
(erase-buffer)
+ (put-text-property 0 (length err) 'face font-lock-warning-face err)
(insert err)
(goto-char (point-min)))))
(let ((register-list (reverse gdb-register-names))
@@ -3390,36 +3391,44 @@
(defun gdb-stack-list-locals-handler ()
(setq gdb-pending-triggers (delq 'gdb-invalidate-locals-1
gdb-pending-triggers))
- (let (local locals-list)
- (goto-char (point-min))
- (while (re-search-forward gdb-stack-list-locals-regexp nil t)
- (let ((local (list (match-string 1)
- (match-string 2)
- nil)))
- (if (looking-at ",value=\\(\".*\"\\).*?}")
- (setcar (nthcdr 2 local) (read (match-string 1))))
- (push local locals-list)))
- (let ((buf (gdb-get-buffer 'gdb-locals-buffer)))
- (and buf (with-current-buffer buf
- (let* ((window (get-buffer-window buf 0))
- (start (window-start window))
- (p (window-point window))
- (buffer-read-only nil))
- (erase-buffer)
- (dolist (local locals-list)
- (setq name (car local))
- (if (or (not (nth 2 local))
- (string-match "\\0x" (nth 2 local)))
- (add-text-properties 0 (length name)
- `(mouse-face highlight
- help-echo "mouse-2: create watch expression"
- local-map ,gdb-locals-watch-map-1)
- name))
+ (goto-char (point-min))
+ (if (re-search-forward gdb-error-regexp nil t)
+ (let ((err (match-string 1)))
+ (with-current-buffer (gdb-get-buffer 'gdb-locals-buffer)
+ (let ((buffer-read-only nil))
+ (erase-buffer)
+ (insert err)
+ (goto-char (point-min)))))
+ (let (local locals-list)
+ (goto-char (point-min))
+ (while (re-search-forward gdb-stack-list-locals-regexp nil t)
+ (let ((local (list (match-string 1)
+ (match-string 2)
+ nil)))
+ (if (looking-at ",value=\\(\".*\"\\).*?}")
+ (setcar (nthcdr 2 local) (read (match-string 1))))
+ (push local locals-list)))
+ (let ((buf (gdb-get-buffer 'gdb-locals-buffer)))
+ (and buf (with-current-buffer buf
+ (let* ((window (get-buffer-window buf 0))
+ (start (window-start window))
+ (p (window-point window))
+ (buffer-read-only nil))
+ (erase-buffer)
+ (dolist (local locals-list)
+ (setq name (car local))
+ (if (or (not (nth 2 local))
+ (string-match "^\\0x" (nth 2 local)))
+ (add-text-properties 0 (length name)
+ `(mouse-face highlight
+ help-echo "mouse-2: create watch expression"
+ local-map ,gdb-locals-watch-map-1)
+ name))
(insert
(concat name "\t" (nth 1 local)
"\t" (nth 2 local) "\n")))
- (set-window-start window start)
- (set-window-point window p)))))))
+ (set-window-start window start)
+ (set-window-point window p))))))))
(defun gdb-get-register-names ()
"Create a list of register names."