emacs-diffs
[Top][All Lists]
Advanced

[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: Mon, 21 Nov 2005 22:10:53 -0500

Index: emacs/lisp/progmodes/gdb-ui.el
diff -c emacs/lisp/progmodes/gdb-ui.el:1.113 
emacs/lisp/progmodes/gdb-ui.el:1.114
*** emacs/lisp/progmodes/gdb-ui.el:1.113        Fri Nov 18 02:47:21 2005
--- emacs/lisp/progmodes/gdb-ui.el      Tue Nov 22 03:10:53 2005
***************
*** 75,83 ****
  ;;    of 'info registers'.
  ;; 3) Use tree-widget.el instead of the speedbar for watch-expressions?
  ;; 4) Mark breakpoint locations on scroll-bar of source buffer?
! ;; 5) After release of 22.1 use '-var-list-children --all-values'
! ;;    and '-stack-list-locals 2' which need GDB 6.1 onwards.
! ;; 6) With gud-print and gud-pstar, print the variable name in the GUD
  ;;    buffer instead of the value's history number.
  
  ;;; Code:
--- 75,85 ----
  ;;    of 'info registers'.
  ;; 3) Use tree-widget.el instead of the speedbar for watch-expressions?
  ;; 4) Mark breakpoint locations on scroll-bar of source buffer?
! ;; 5) After release of 22.1, use "-var-list-children --all-values"
! ;;    and "-stack-list-locals --simple-values" which need GDB 6.1 onwards.
! ;; 6) After release of 22.1, use "-var-update --all-values" which needs
! ;;    GDB 6.4 onwards.
! ;; 7) With gud-print and gud-pstar, print the variable name in the GUD
  ;;    buffer instead of the value's history number.
  
  ;;; Code:
***************
*** 2230,2235 ****
--- 2232,2258 ----
    "server info locals\n"
    gdb-info-locals-handler)
  
+ (defvar gdb-locals-watch-keymap
+   (let ((map (make-sparse-keymap)))
+     (define-key map [mouse-2] '(lambda (event) (interactive "e")
+                                (mouse-set-point event)
+                                (beginning-of-line)
+                                (gud-watch)))
+     map)
+  "Keymap to create watch expression of a complex data type local variable.")
+ 
+ (defconst gdb-struct-string
+   (concat (propertize "[struct/union];"
+                     'mouse-face 'highlight
+                     'help-echo "mouse-2: create watch expression"
+                     'local-map gdb-locals-watch-keymap) "\n"))
+ 
+ (defconst gdb-array-string
+   (concat " " (propertize "[array];"
+                         'mouse-face 'highlight
+                         'help-echo "mouse-2: create watch expression"
+                         'local-map gdb-locals-watch-keymap) "\n"))
+ 
  ;; Abbreviate for arrays and structures.
  ;; These can be expanded using gud-display.
  (defun gdb-info-locals-handler ()
***************
*** 2242,2251 ****
        (replace-match "" nil nil))
        (goto-char (point-min))
        (while (re-search-forward "{\\(.*=.*\n\\|\n\\)" nil t)
!       (replace-match "(structure);\n" nil nil))
        (goto-char (point-min))
        (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
--- 2265,2274 ----
        (replace-match "" nil nil))
        (goto-char (point-min))
        (while (re-search-forward "{\\(.*=.*\n\\|\n\\)" nil t)
!       (replace-match gdb-struct-string nil nil))
        (goto-char (point-min))
        (while (re-search-forward "\\s-*{.*\n" nil t)
!       (replace-match gdb-array-string nil nil))))
    (let ((buf (gdb-get-buffer 'gdb-locals-buffer)))
      (and buf
         (with-current-buffer buf
***************
*** 2504,2509 ****
--- 2527,2533 ----
        (delq 'gdb-overlay-arrow-position overlay-arrow-variable-list))
    (setq gud-running nil)
    (setq gdb-active-process nil)
+   (setq gdb-var-list nil)
    (remove-hook 'after-save-hook 'gdb-create-define-alist t))
  
  (defun gdb-source-info ()




reply via email to

[Prev in Thread] Current Thread [Next in Thread]