From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Mike Garey Newsgroups: gmane.emacs.help Subject: suppressing gdb subprocess control characters? (was Re: emacs gdb subproccess ignores printf (stdout isn't flushed ?) on OS X) Date: Sun, 20 Feb 2005 18:08:03 -0500 Message-ID: <16a8b91405022015087591595d@mail.gmail.com> References: <16a8b914050220111754b1cb75@mail.gmail.com> <8672e8beacc740604ebf814ed7a1a433@Web.DE> Reply-To: Mike Garey NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1108940915 3264 80.91.229.2 (20 Feb 2005 23:08:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 20 Feb 2005 23:08:35 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 21 00:08:35 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D30Bc-0005CZ-CP for geh-help-gnu-emacs@m.gmane.org; Mon, 21 Feb 2005 00:08:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D30SR-0008E0-U5 for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Feb 2005 18:25:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D30RD-0007qA-8A for help-gnu-emacs@gnu.org; Sun, 20 Feb 2005 18:24:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D30RB-0007pD-0F for help-gnu-emacs@gnu.org; Sun, 20 Feb 2005 18:24:30 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D30RA-0007oj-H5 for help-gnu-emacs@gnu.org; Sun, 20 Feb 2005 18:24:28 -0500 Original-Received: from [64.233.170.192] (helo=rproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D30BI-0008WD-0M for help-gnu-emacs@gnu.org; Sun, 20 Feb 2005 18:08:04 -0500 Original-Received: by rproxy.gmail.com with SMTP id y7so192365rne for ; Sun, 20 Feb 2005 15:08:03 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=KUM2vNgCffzfHvJmhCZPIggyspG4J+yjhEZ8rE9X9YzNcILlUfEIJjVyc1+iSuj5ZxOAOmgTXlPuEkTx8zXDL7tf/3s/QMITt4GhG3VIIfJskiI3iVc4cDTJiDcJONPq33ZiL293jmT+1cxX1bpu4tGyW8IiUYdchKIS6hzDxk4= Original-Received: by 10.38.208.45 with SMTP id f45mr175474rng; Sun, 20 Feb 2005 15:08:03 -0800 (PST) Original-Received: by 10.38.171.26 with HTTP; Sun, 20 Feb 2005 15:08:03 -0800 (PST) Original-To: help-gnu-emacs@gnu.org In-Reply-To: <8672e8beacc740604ebf814ed7a1a433@Web.DE> X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: main.gmane.org gmane.emacs.help:24203 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:24203 Thanks for the help Peter, setting process-connection-type to true worked. I should also mention that after I sent the message to the list, I downloaded and compiled the newest CVS source (GNU Emacs 22.0.50.1), and it seemed to fix the problem as well (without the need to setq process-connection-type t). Although, strangely enough, with the newest CVS version, I no longer get a red dot representing a breakpoint under the gdb subprocess.. I'm sure there's probably just some setting I need to change to get this to work. I'm still curious as to how to suppress the strange control characters printed by gdb, such as: ^[[2A ^[[0Khello, world! since it'd be a lot easier to read output without seeing these odd characters. Thanks again for the help! Mike P.S. I've tried setting the gdb annotation level to 1 to remove the control characters, and while it removes some of them, the ones above still remain (although they only appear when executing a printf statement it seems). I'm thinking it might have something to do with the buffer-coding-system setting? On Sun, 20 Feb 2005 23:51:20 +0100, Peter Dyballa wrote: > > Am 20.02.2005 um 20:17 schrieb Mike Garey: > > > I've noticed that when using gdb under the carbon (Apple OS X) version > > of GNU Emacs 21.3.50.1, printf statements are not printed until after > > the program has terminated, even though the print statements contain a > > newline. I can force them to print by modifying my source and adding > > "fflush(NULL);" after each printf statement, but I'd like to find out > > how to avoid this. > > Hello! > > Could you check process-connection-type? Is it nil, i.e.communication > via pipes? Then try it with this: > > (setq process-connection-type t) > > This makes shell work correct too! > > -- > Greetings > > Pete > > The mathematician who pursues his studies without clear views of this > matter, must often have the uncomfortable feeling that his paper and > pencil surpass him in intelligence. (Ernst Mach) > >