# HG changeset patch # User Nick Roberts # Date 1251849228 0 # Node ID 6c936850031722703997e486cf45121a04d3700b # Parent 8c3a6b79365e0176807f326fb3b4010430f34f44 (gdb-current-context-command): Move the space ... (gdb-gud-context-call): ... to here for pre GDB 7.0 when there is no "--thread" option. (gdb-stopped): Don't print "Switched to thread" message when it is unchanged. diff -r 8c3a6b79365e -r 6c9368500317 lisp/progmodes/gdb-mi.el --- a/lisp/progmodes/gdb-mi.el Tue Sep 01 23:36:27 2009 +0000 +++ b/lisp/progmodes/gdb-mi.el Tue Sep 01 23:53:48 2009 +0000 @@ -579,9 +579,8 @@ NOARG must be t when this macro is used outside `gud-def'" `(gud-call - (concat - (gdb-gud-context-command ,cmd1 ,noall) - ,cmd2) ,(when (not noarg) 'arg))) + (concat (gdb-gud-context-command ,cmd1 ,noall) " " ,cmd2) + ,(when (not noarg) 'arg))) ;;;###autoload (defun gdb (command-line) @@ -1609,7 +1608,7 @@ ;; gdb-frame-number may be nil while gdb-thread-number is non-nil ;; (when current thread is running) (if gdb-thread-number - (concat command " --thread " gdb-thread-number " ") + (concat command " --thread " gdb-thread-number) command)) (defun gdb-current-context-buffer-name (name) @@ -1921,9 +1920,9 @@ ;; reasons (if (or (eq gdb-switch-reasons t) (member reason gdb-switch-reasons)) - (progn - (gdb-setq-thread-number thread-id) - (message (concat "Switched to thread " thread-id))) + (when (not (string-equal gdb-thread-number thread-id)) + (message (concat "Switched to thread " thread-id)) + (gdb-setq-thread-number thread-id)) (message (format "Thread %s stopped" thread-id))))) ;; Print "(gdb)" to GUD console