diff options
| author | Nick Roberts | 2010-03-26 21:58:41 +1300 |
|---|---|---|
| committer | Nick Roberts | 2010-03-26 21:58:41 +1300 |
| commit | eca16aa79a024a7fd5f0c98889773964f089d714 (patch) | |
| tree | cdbc89a71d116ac945273daacd53d1024f903756 | |
| parent | ef7b27ef14161df98ee199ace01258fc54aea013 (diff) | |
| download | emacs-eca16aa79a024a7fd5f0c98889773964f089d714.tar.gz emacs-eca16aa79a024a7fd5f0c98889773964f089d714.zip | |
(gdb-apple-test): New function.
(gdb-init-1): Use it.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/progmodes/gdb-ui.el | 15 |
2 files changed, 21 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 37605ea3bdb..1d31f31a20b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2010-03-26 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | Nick Roberts <nickrob@snap.net.nz> | ||
| 3 | |||
| 4 | * progmodes/gdb-ui.el (gdb-apple-test): New function. | ||
| 5 | (gdb-init-1): Use it. | ||
| 6 | |||
| 1 | 2010-02-10 Dan Nicolaescu <dann@ics.uci.edu> | 7 | 2010-02-10 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 8 | ||
| 3 | * vc.el (vc-root-diff): Doc fix. | 9 | * vc.el (vc-root-diff): Doc fix. |
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 9c4f8b4dd58..aa4cfab1bad 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -705,6 +705,9 @@ otherwise do not." | |||
| 705 | 705 | ||
| 706 | (if gdb-use-separate-io-buffer (gdb-clear-inferior-io)) | 706 | (if gdb-use-separate-io-buffer (gdb-clear-inferior-io)) |
| 707 | 707 | ||
| 708 | (if (eq system-type 'darwin) | ||
| 709 | (gdb-enqueue-input (list "server show version\n" 'gdb-apple-test))) | ||
| 710 | |||
| 708 | ;; Hack to see test for GDB 6.4+ (-stack-info-frame was implemented in 6.4) | 711 | ;; Hack to see test for GDB 6.4+ (-stack-info-frame was implemented in 6.4) |
| 709 | (gdb-enqueue-input (list "server interpreter mi -stack-info-frame\n" | 712 | (gdb-enqueue-input (list "server interpreter mi -stack-info-frame\n" |
| 710 | 'gdb-get-version))) | 713 | 'gdb-get-version))) |
| @@ -736,6 +739,18 @@ otherwise do not." | |||
| 736 | (gdb-enqueue-input (list "server list MAIN__\n" 'ignore)) | 739 | (gdb-enqueue-input (list "server list MAIN__\n" 'ignore)) |
| 737 | (gdb-enqueue-input (list "server info source\n" 'gdb-source-info))) | 740 | (gdb-enqueue-input (list "server info source\n" 'gdb-source-info))) |
| 738 | 741 | ||
| 742 | ;; Workaround for some Apple versions of GDB that add ^M at EOL | ||
| 743 | ;; after the command "server interpreter mi -stack-info-frame". | ||
| 744 | (defun gdb-apple-test () | ||
| 745 | (goto-char (point-min)) | ||
| 746 | (if (re-search-forward "(Apple version " nil t) | ||
| 747 | (let* ((process (get-buffer-process gud-comint-buffer)) | ||
| 748 | (coding-systems (process-coding-system process))) | ||
| 749 | (set-process-coding-system process | ||
| 750 | (coding-system-change-eol-conversion | ||
| 751 | (car coding-systems) 'dos) | ||
| 752 | (cdr coding-systems))))) | ||
| 753 | |||
| 739 | (defun gdb-get-version () | 754 | (defun gdb-get-version () |
| 740 | (goto-char (point-min)) | 755 | (goto-char (point-min)) |
| 741 | (if (re-search-forward "Undefined\\( mi\\)* command:" nil t) | 756 | (if (re-search-forward "Undefined\\( mi\\)* command:" nil t) |