emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp ChangeLog progmodes/gdb-mi.el


From: Dmitry Dzhus
Subject: [Emacs-diffs] emacs/lisp ChangeLog progmodes/gdb-mi.el
Date: Sat, 08 Aug 2009 22:30:32 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Dmitry Dzhus <sphinx>   09/08/08 22:30:31

Modified files:
        lisp           : ChangeLog 
        lisp/progmodes : gdb-mi.el 

Log message:
        (gdb-control-all-threads)
        (gdb-control-current-thread): Interactive setters for
        `gdb-gud-control-all-threads' to use in menu.
        (gdb-show-run-p): Show «Go» when process is not active.
        (gud-tool-bar-map): Add non-stop/A,T indicator. Uses
        gud/thread.xpm and gud/all.xpm.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15909&r2=1.15910
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/progmodes/gdb-mi.el?cvsroot=emacs&r1=1.29&r2=1.30

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15909
retrieving revision 1.15910
diff -u -b -r1.15909 -r1.15910
--- ChangeLog   8 Aug 2009 18:27:10 -0000       1.15909
+++ ChangeLog   8 Aug 2009 22:30:26 -0000       1.15910
@@ -1,3 +1,12 @@
+2009-08-08  Dmitry Dzhus  <address@hidden>
+
+       * progmodes/gdb-mi.el (gdb-control-all-threads)
+       (gdb-control-current-thread): Interactive setters for
+       `gdb-gud-control-all-threads' to use in menu.
+       (gdb-show-run-p): Show «Go» when process is not active.
+       (gud-tool-bar-map): Add non-stop/A,T indicator. Uses
+       gud/thread.xpm and gud/all.xpm.
+
 2009-08-08  Yoni Rabkin  <address@hidden>
 
        * net/net-utils.el (net-utils-font-lock-keywords): New var.

Index: progmodes/gdb-mi.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/gdb-mi.el,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- progmodes/gdb-mi.el 8 Aug 2009 18:24:35 -0000       1.29
+++ progmodes/gdb-mi.el 8 Aug 2009 22:30:31 -0000       1.30
@@ -519,6 +519,19 @@
   (message (format "Logging of transaction %sabled"
                   (if gdb-enable-debug "en" "dis"))))
 
+;; These two are used for menu and toolbar
+(defun gdb-control-all-threads ()
+  "Switch to non-stop/A mode."
+  (interactive)
+  (setq gdb-gud-control-all-threads t)
+  (message "Now in non-stop/A mode."))
+
+(defun gdb-control-current-thread ()
+  "Switch to non-stop/T mode."
+  (interactive)
+  (setq gdb-gud-control-all-threads nil)
+  (message "Now in non-stop/T mode."))
+
 (defun gdb-find-watch-expression ()
   (let* ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list))
         (varnum (car var)) expr array)
@@ -1669,7 +1682,8 @@
 
 (defun gdb-show-run-p ()
   "Return t if \"Run/continue\" should be shown on the toolbar."
-  (or (and (or
+  (or (not gdb-active-process)
+      (and (or
             (not gdb-gud-control-all-threads)
             (not gdb-non-stop))
            (not gud-running))
@@ -3824,6 +3838,27 @@
   (define-key gud-menu-map [mi]
     `(menu-item "GDB-MI" ,menu :visible (eq gud-minor-mode 'gdbmi))))
 
+;; TODO Fit these into tool-bar-local-item-from-menu call in gud.el.
+;; GDB-MI menu will need to be moved to gud.el. We can't use
+;; tool-bar-local-item-from-menu here because it appends new buttons
+;; to toolbar from right to left while we want our A/T throttle to
+;; show up right before Run button.
+(define-key-after gud-tool-bar-map [all-threads]
+  '(menu-item "Switch to non-stop/A mode" gdb-control-all-threads
+              :image (find-image '((:type xpm :file "gud/thread.xpm")))
+              :visible (and (eq gud-minor-mode 'gdbmi)
+                            gdb-non-stop
+                            (not gdb-gud-control-all-threads)))
+  'run)
+
+(define-key-after gud-tool-bar-map [current-thread]
+  '(menu-item "Switch to non-stop/T mode" gdb-control-current-thread
+              :image (find-image '((:type xpm :file "gud/all.xpm")))
+              :visible (and (eq gud-minor-mode 'gdbmi)
+                            gdb-non-stop
+                            gdb-gud-control-all-threads))
+  'all-threads)
+
 (defun gdb-frame-gdb-buffer ()
   "Display GUD buffer in a new frame."
   (interactive)




reply via email to

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