[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: |
Wed, 23 Sep 2009 23:22:14 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Nick Roberts <nickrob> 09/09/23 23:22:14
Modified files:
lisp/progmodes : gdb-mi.el
Log message:
(gdb-version): New variable.
(gdb-non-stop-handler): Set gdb-version.
(gdb-gud-context-command, gdb-current-context-command, gdb-stopped):
Condition "--thread" option on gdb-version.
(gdb-invalidate-threads): Remove unused argument.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/progmodes/gdb-mi.el?cvsroot=emacs&r1=1.49&r2=1.50
Patches:
Index: gdb-mi.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/gdb-mi.el,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -b -r1.49 -r1.50
--- gdb-mi.el 19 Sep 2009 11:45:57 -0000 1.49
+++ gdb-mi.el 23 Sep 2009 23:22:13 -0000 1.50
@@ -218,6 +218,7 @@
(defvar gdb-source-window nil)
(defvar gdb-inferior-status nil)
(defvar gdb-continuation nil)
+(defvar gdb-version nil)
(defvar gdb-filter-output nil
"Message to be shown in GUD console.
@@ -571,9 +572,10 @@
When `gdb-non-stop' is nil, return COMMAND unchanged."
(if gdb-non-stop
(if (and gdb-gud-control-all-threads
- (not noall))
+ (not noall)
+ (string-equal gdb-version "7.0+"))
(concat command " --all ")
- (gdb-current-context-command command t))
+ (gdb-current-context-command command))
command))
(defmacro gdb-gud-context-call (cmd1 &optional cmd2 noall noarg)
@@ -820,7 +822,9 @@
(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))
+ (setq gdb-non-stop nil)
+ (setq gdb-version "pre-7.0"))
+ (setq gdb-version "7.0+")
(gdb-input (list "-gdb-set target-async 1" 'ignore))
(gdb-input (list "-enable-pretty-printing" 'ignore))))
@@ -1629,16 +1633,10 @@
(concat (car item) "\n")))
;; NOFRAME is used for gud execution control commands
-(defun gdb-current-context-command (command &optional noframe)
- "Add --thread and --frame options to gdb COMMAND.
-
-Option values are taken from `gdb-thread-number' and
-`gdb-frame-number'. If `gdb-thread-number' is nil, COMMAND is
-returned unchanged. If `gdb-frame-number' is nil of NOFRAME is t,
-then no --frame option is added."
- ;; gdb-frame-number may be nil while gdb-thread-number is non-nil
- ;; (when current thread is running)
- (if gdb-thread-number
+(defun gdb-current-context-command (command)
+ "Add --thread to gdb COMMAND when needed."
+ (if (and gdb-thread-number
+ (string-equal gdb-version "7.0+"))
(concat command " --thread " gdb-thread-number)
command))
@@ -1920,7 +1918,9 @@
;; thread
(when (not gdb-register-names)
(gdb-input
- (list (concat "-data-list-register-names --thread " thread-id)
+ (list (concat "-data-list-register-names"
+ (if (string-equal gdb-version "7.0+")
+ (concat" --thread " thread-id)))
'gdb-register-names-handler)))
;;; Don't set gud-last-frame here as it's currently done in gdb-frame-handler
@@ -2565,7 +2565,7 @@
"Display GDB threads in a new frame.")
(def-gdb-trigger-and-handler
- gdb-invalidate-threads (gdb-current-context-command "-thread-info"
gud-running)
+ gdb-invalidate-threads (gdb-current-context-command "-thread-info")
gdb-thread-list-handler gdb-thread-list-handler-custom
'(start update update-threads))
- [Emacs-diffs] emacs/lisp/progmodes gdb-mi.el, Nick Roberts, 2009/09/01
- [Emacs-diffs] emacs/lisp/progmodes gdb-mi.el, Nick Roberts, 2009/09/01
- [Emacs-diffs] emacs/lisp/progmodes gdb-mi.el, Nick Roberts, 2009/09/09
- [Emacs-diffs] emacs/lisp/progmodes gdb-mi.el, Nick Roberts, 2009/09/09
- [Emacs-diffs] emacs/lisp/progmodes gdb-mi.el, Nick Roberts, 2009/09/11
- [Emacs-diffs] emacs/lisp/progmodes gdb-mi.el, Nick Roberts, 2009/09/11
- [Emacs-diffs] emacs/lisp/progmodes gdb-mi.el, Nick Roberts, 2009/09/17
- [Emacs-diffs] emacs/lisp/progmodes gdb-mi.el, Nick Roberts, 2009/09/19
- [Emacs-diffs] emacs/lisp/progmodes gdb-mi.el,
Nick Roberts <=
- [Emacs-diffs] emacs/lisp/progmodes gdb-mi.el, Nick Roberts, 2009/09/24