[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp/progmodes gdb-mi.el
From: |
Nick Roberts |
Subject: |
[Emacs-diffs] emacs/lisp/progmodes gdb-mi.el |
Date: |
Mon, 31 Aug 2009 00:28:38 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Nick Roberts <nickrob> 09/08/31 00:28:37
Modified files:
lisp/progmodes : gdb-mi.el
Log message:
(gdb-control-all-threads)
(gdb-control-current-thread): Force tool bar update.
(gdb-non-stop-handler): New function.
(gdb-init-1): Use it to test if GDB version supports non-stop mode
Remove unused gdbmi buffer type.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/progmodes/gdb-mi.el?cvsroot=emacs&r1=1.38&r2=1.39
Patches:
Index: gdb-mi.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/gdb-mi.el,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -b -r1.38 -r1.39
--- gdb-mi.el 29 Aug 2009 02:23:18 -0000 1.38
+++ gdb-mi.el 31 Aug 2009 00:28:37 -0000 1.39
@@ -528,12 +528,16 @@
"Switch to non-stop/A mode."
(interactive)
(setq gdb-gud-control-all-threads t)
+ ;; Actually forcing the tool-bar to update.
+ (force-mode-line-update)
(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)
+ ;; Actually forcing the tool-bar to update.
+ (force-mode-line-update)
(message "Now in non-stop/T mode."))
(defun gdb-find-watch-expression ()
@@ -803,8 +807,7 @@
(gdb-input (list "-gdb-set height 0" 'ignore))
(when gdb-non-stop
- (gdb-input (list "-gdb-set non-stop 1" 'ignore))
- (gdb-input (list "-gdb-set target-async 1" 'ignore)))
+ (gdb-input (list "-gdb-set non-stop 1" 'gdb-non-stop-handler)))
;; find source file and compilation directory here
(gdb-input
@@ -817,6 +820,14 @@
(gdb-input
(list "-gdb-show prompt" 'gdb-get-prompt)))
+(defun gdb-non-stop-handler ()
+ (goto-char (point-min))
+ (if (re-search-forward "No symbol" nil t)
+ (progn
+ (message "This version of GDB doesn't support non-stop mode. Turning
it off.")
+ (setq gdb-non-stop nil))
+ (gdb-input (list "-gdb-set target-async 1" 'ignore))))
+
(defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.")
(defun gdb-create-define-alist ()
@@ -1372,9 +1383,6 @@
(gdb-bind-function-to-buffer trigger (current-buffer))))))))
nil t))
-;; GUD buffers are an exception to the rules
-(gdb-set-buffer-rules 'gdbmi 'error)
-
;; Partial-output buffer : This accumulates output from a command executed on
;; behalf of emacs (rather than the user).
;;
@@ -1668,7 +1676,8 @@
"Only this function must be used to change `gdb-thread-number'
value to NUMBER, because `gud-running' and `gdb-frame-number'
need to be updated appropriately when current thread changes."
- (setq gdb-thread-number number)
+ ;; GDB 6.8 and earlier always output thread-id="0" when stopping.
+ (unless (string-equal number "0") (setq gdb-thread-number number))
(setq gdb-frame-number "0")
(gdb-update-gud-running))