Commit d50f7687 authored by Nick Roberts's avatar Nick Roberts
Browse files


(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.
parent ab96f28b
......@@ -528,12 +528,16 @@ the list) is deleted every time a new one is added (at the front)."
"Switch to non-stop/A mode."
(setq gdb-gud-control-all-threads t)
;; Actually forcing the tool-bar to update.
(message "Now in non-stop/A mode."))
(defun gdb-control-current-thread ()
"Switch to non-stop/T mode."
(setq gdb-gud-control-all-threads nil)
;; Actually forcing the tool-bar to update.
(message "Now in non-stop/T mode."))
(defun gdb-find-watch-expression ()
......@@ -803,8 +807,7 @@ detailed description of this mode.
(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
......@@ -817,6 +820,14 @@ detailed description of this mode.
(list "-gdb-show prompt" 'gdb-get-prompt)))
(defun gdb-non-stop-handler ()
(goto-char (point-min))
(if (re-search-forward "No symbol" nil t)
(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 @@ DOC is an optional documentation string."
(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 @@ If `gdb-thread-number' is nil, just wrap NAME in asterisks."
"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")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment