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: Fri, 25 Nov 2005 16:34:03 -0500

Index: emacs/lisp/progmodes/gdb-ui.el
diff -c emacs/lisp/progmodes/gdb-ui.el:1.117 
emacs/lisp/progmodes/gdb-ui.el:1.118
*** emacs/lisp/progmodes/gdb-ui.el:1.117        Thu Nov 24 20:45:50 2005
--- emacs/lisp/progmodes/gdb-ui.el      Fri Nov 25 21:34:03 2005
***************
*** 1466,1476 ****
                                (gdb-put-breakpoint-icon (eq flag ?y) bptno)))
                          (gdb-enqueue-input
                           (list
!                           (concat "list "
                                    (match-string-no-properties 1) ":1\n")
                            'ignore))
                          (gdb-enqueue-input
!                          (list "info source\n"
                                 `(lambda () (gdb-get-location
                                              ,bptno ,line ,flag))))))))))
          (end-of-line)))))
--- 1466,1476 ----
                                (gdb-put-breakpoint-icon (eq flag ?y) bptno)))
                          (gdb-enqueue-input
                           (list
!                           (concat gdb-server-prefix "list "
                                    (match-string-no-properties 1) ":1\n")
                            'ignore))
                          (gdb-enqueue-input
!                          (list (concat gdb-server-prefix "info source\n")
                                 `(lambda () (gdb-get-location
                                              ,bptno ,line ,flag))))))))))
          (end-of-line)))))
***************
*** 1505,1511 ****
                 (list
                  (let ((bptno (get-text-property
                                0 'gdb-bptno (car (posn-string posn)))))
!                   (concat
                            (if (get-text-property
                                 0 'gdb-enabled (car (posn-string posn)))
                                "disable "
--- 1505,1511 ----
                 (list
                  (let ((bptno (get-text-property
                                0 'gdb-bptno (car (posn-string posn)))))
!                   (concat gdb-server-prefix
                            (if (get-text-property
                                 0 'gdb-enabled (car (posn-string posn)))
                                "disable "
***************
*** 1531,1537 ****
          (when (stringp obj)
            (gdb-enqueue-input
             (list
!             (concat
               (if (get-text-property 0 'gdb-enabled obj)
                   "disable "
                 "enable ")
--- 1531,1537 ----
          (when (stringp obj)
            (gdb-enqueue-input
             (list
!             (concat gdb-server-prefix
               (if (get-text-property 0 'gdb-enabled obj)
                   "disable "
                 "enable ")
***************
*** 1832,1838 ****
    (interactive (list last-input-event))
    (if event (mouse-set-point event))
    (gdb-enqueue-input
!    (list (concat "thread " (gdb-get-thread-number) "\n") 'ignore))
    (gud-display-frame))
  
  
--- 1832,1839 ----
    (interactive (list last-input-event))
    (if event (mouse-set-point event))
    (gdb-enqueue-input
!    (list (concat gdb-server-prefix "thread "
!                (gdb-get-thread-number) "\n") 'ignore))
    (gud-display-frame))
  
  
***************
*** 1859,1877 ****
    (with-current-buffer (gdb-get-buffer 'gdb-registers-buffer)
      (save-excursion
        (let ((buffer-read-only nil)
!           bl)
        (goto-char (point-min))
        (while (< (point) (point-max))
!         (setq bl (line-beginning-position))
          (when (looking-at "^[^ ]+")
            (unless (string-equal (match-string 0) "The")
!             (put-text-property bl (match-end 0)
!                                'face font-lock-variable-name-face)))
          (forward-line 1))))))
  
  (defvar gdb-registers-mode-map
    (let ((map (make-sparse-keymap)))
      (suppress-keymap map)
      (define-key map " " 'toggle-gdb-all-registers)
      (define-key map "q" 'kill-this-buffer)
       map))
--- 1860,1895 ----
    (with-current-buffer (gdb-get-buffer 'gdb-registers-buffer)
      (save-excursion
        (let ((buffer-read-only nil)
!           start end)
        (goto-char (point-min))
        (while (< (point) (point-max))
!         (setq start (line-beginning-position))
!         (setq end (line-end-position))
          (when (looking-at "^[^ ]+")
            (unless (string-equal (match-string 0) "The")
!             (put-text-property start (match-end 0)
!                                'face font-lock-variable-name-face)
!             (add-text-properties start end 
!                                  '(help-echo "mouse-2: edit value"
!                                    mouse-face highlight))))
          (forward-line 1))))))
  
+ (defun gdb-edit-register-value (&optional event)
+   (interactive (list last-input-event))
+   (save-excursion
+     (if event (mouse-set-point event))
+     (beginning-of-line)
+     (let* ((register (current-word))
+         (value (read-string (format "New value (%s): " register))))
+       (gdb-enqueue-input
+        (list (concat gdb-server-prefix "set $" register "=" value "\n")
+            'ignore)))))
+ 
  (defvar gdb-registers-mode-map
    (let ((map (make-sparse-keymap)))
      (suppress-keymap map)
+     (define-key map "\r" 'gdb-edit-register-value)
+     (define-key map [mouse-2] 'gdb-edit-register-value)
      (define-key map " " 'toggle-gdb-all-registers)
      (define-key map "q" 'kill-this-buffer)
       map))
***************
*** 1915,1923 ****
        (setq gdb-all-registers nil)
        (with-current-buffer (gdb-get-buffer 'gdb-registers-buffer)
          (setq mode-name "Registers:")))
!       (setq gdb-all-registers t)
!       (with-current-buffer (gdb-get-buffer 'gdb-registers-buffer)
!         (setq mode-name "Registers:All")))
    (gdb-invalidate-registers))
  
  
--- 1933,1941 ----
        (setq gdb-all-registers nil)
        (with-current-buffer (gdb-get-buffer 'gdb-registers-buffer)
          (setq mode-name "Registers:")))
!     (setq gdb-all-registers t)
!     (with-current-buffer (gdb-get-buffer 'gdb-registers-buffer)
!       (setq mode-name "Registers:All")))
    (gdb-invalidate-registers))
  
  
***************
*** 2253,2265 ****
   "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"))
--- 2271,2283 ----
   "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"))




reply via email to

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