[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-23 r99683: (gdb-apple-test): New func
From: |
Nick Roberts |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-23 r99683: (gdb-apple-test): New function. |
Date: |
Fri, 26 Mar 2010 21:56:09 +1300 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 99683
committer: Nick Roberts <address@hidden>
branch nick: emacs-23
timestamp: Fri 2010-03-26 21:56:09 +1300
message:
(gdb-apple-test): New function.
(gdb-init-1): Use it.
modified:
lisp/ChangeLog
lisp/progmodes/gdb-ui.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-03-25 23:41:22 +0000
+++ b/lisp/ChangeLog 2010-03-26 08:56:09 +0000
@@ -1,3 +1,8 @@
+2010-03-26 Nick Roberts <address@hidden>
+
+ * progmodes/gdb-ui.el (gdb-apple-test): New function.
+ (gdb-init-1): Use it.
+
2010-02-10 Dan Nicolaescu <address@hidden>
* vc.el (vc-root-diff): Doc fix.
=== modified file 'lisp/progmodes/gdb-ui.el'
--- a/lisp/progmodes/gdb-ui.el 2010-02-19 04:55:31 +0000
+++ b/lisp/progmodes/gdb-ui.el 2010-03-26 08:56:09 +0000
@@ -705,6 +705,9 @@
(if gdb-use-separate-io-buffer (gdb-clear-inferior-io))
+ (if (eq system-type 'darwin)
+ (gdb-enqueue-input (list "server show version\n" 'gdb-apple-test)))
+
;; Hack to see test for GDB 6.4+ (-stack-info-frame was implemented in 6.4)
(gdb-enqueue-input (list "server interpreter mi -stack-info-frame\n"
'gdb-get-version)))
@@ -736,6 +739,18 @@
(gdb-enqueue-input (list "server list MAIN__\n" 'ignore))
(gdb-enqueue-input (list "server info source\n" 'gdb-source-info)))
+;; Workaround for some Apple versions of GDB that add ^M at EOL
+;; after the command "server interpreter mi -stack-info-frame".
+(defun gdb-apple-test ()
+ (goto-char (point-min))
+ (if (re-search-forward "(Apple version " nil t)
+ (let* ((process (get-buffer-process gud-comint-buffer))
+ (coding-systems (process-coding-system process)))
+ (set-process-coding-system process
+ (coding-system-change-eol-conversion
+ (car coding-systems) 'dos)
+ (cdr coding-systems)))))
+
(defun gdb-get-version ()
(goto-char (point-min))
(if (re-search-forward "Undefined\\( mi\\)* command:" nil t)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-23 r99683: (gdb-apple-test): New function.,
Nick Roberts <=