From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: nickrob@snap.net.nz (Nick Roberts) Newsgroups: gmane.emacs.devel Subject: Re: GDB on Mac is (NOT) Broken Date: Tue, 16 Mar 2010 18:27:03 +1300 Message-ID: <19359.5799.721358.312552@totara.tehura.co.nz> References: <19357.53872.672127.600861@totara.tehura.co.nz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1268718499 17498 80.91.229.12 (16 Mar 2010 05:48:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 16 Mar 2010 05:48:19 +0000 (UTC) Cc: emacs-devel@gnu.org To: YAMAMOTO Mitsuharu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 16 06:48:15 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NrPdW-0001tU-Jp for ged-emacs-devel@m.gmane.org; Tue, 16 Mar 2010 06:48:14 +0100 Original-Received: from localhost ([127.0.0.1]:41682 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NrPdV-0002Tz-FO for ged-emacs-devel@m.gmane.org; Tue, 16 Mar 2010 01:48:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NrPdN-0002TH-9p for emacs-devel@gnu.org; Tue, 16 Mar 2010 01:48:05 -0400 Original-Received: from [140.186.70.92] (port=55925 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NrPdL-0002Si-Fs for emacs-devel@gnu.org; Tue, 16 Mar 2010 01:48:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NrPdI-0001eJ-GF for emacs-devel@gnu.org; Tue, 16 Mar 2010 01:48:03 -0400 Original-Received: from viper.snap.net.nz ([202.37.101.25]:59917) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NrPdI-0001dp-2i for emacs-devel@gnu.org; Tue, 16 Mar 2010 01:48:00 -0400 Original-Received: from totara (134.31.255.123.dynamic.snap.net.nz [123.255.31.134]) by viper.snap.net.nz (Postfix) with ESMTP id 971B93DAE81; Tue, 16 Mar 2010 18:27:05 +1300 (NZDT) Original-Received: by totara (Postfix, from userid 1000) id C01B4C16F; Tue, 16 Mar 2010 18:27:03 +1300 (NZDT) In-Reply-To: X-Mailer: VM 7.19 under Emacs 22.2.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:122042 Archived-At: > The simplest workaround would be something like (push '("\\`gdb\\'" > . (utf-8-dos . utf-8-unix)) process-coding-system-alist). But > detecting Apple versions of GDB would be better. Could you check the > patch below? I can only currently try it on GNU/Linux and I can confirm that it doesn't break behaviour there. Maybe Chad Brown or Leo could test it on a Mac. I suspect that FSF GDB on Mac would still also work but it would be good to check this too. If there are no problems then please commit this change. -- Nick http://users.snap.net.nz/~nickrob > *************** > *** 1769,1774 **** > --- 1781,1792 ---- > (progn > (setq output (gdb-concat-output output gud-marker-acc)) > (setq gud-marker-acc ""))) > + (if (not (string-match "\n" gdb-first-output-line)) (if (gdb-first-post-prompt) would probably also work > + (setq gdb-first-output-line > + (concat gdb-first-output-line > + (if (string-match "\n" output) > + (substring output 0 (match-end 0)) > + output)))) > output))) > > (defun gdb-concat-output (so-far new) >