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: emacs gdb subproccess ignores printf (stdout isn't flushed ?) on OS X Date: Sun, 20 Feb 2005 14:17:16 -0500 Message-ID: <16a8b914050220111754b1cb75@mail.gmail.com> Reply-To: Mike Garey NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1108928358 9712 80.91.229.2 (20 Feb 2005 19:39:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 20 Feb 2005 19:39:18 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Feb 20 20:39:18 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D2wv6-0003bO-Ru for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Feb 2005 20:39:09 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D2xBu-0007XM-NV for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Feb 2005 14:56:30 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D2x7v-0005TE-7z for help-gnu-emacs@gnu.org; Sun, 20 Feb 2005 14:52:24 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D2x7k-0005Q5-AV for help-gnu-emacs@gnu.org; Sun, 20 Feb 2005 14:52:15 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D2x7i-0005KF-JL for help-gnu-emacs@gnu.org; Sun, 20 Feb 2005 14:52:10 -0500 Original-Received: from [64.233.170.199] (helo=rproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D2waf-0005Lp-CG for help-gnu-emacs@gnu.org; Sun, 20 Feb 2005 14:18:01 -0500 Original-Received: by rproxy.gmail.com with SMTP id y7so171899rne for ; Sun, 20 Feb 2005 11:18:00 -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:mime-version:content-type:content-transfer-encoding; b=WKoAuI9zEpAU1StOtgHIcIBYGvMBs9uiPpbHZM5vWOOywmO9HV/Cj3uOJ1FCm064YIWyD7Tt8a1NB09JX5g0H9y12Zg7lDEWYBmNbo9v0zs2xkXB06eNXYe5kOu1H9OK4xtuszN0Pkc1Z9Y9QaHTHLEZXbPwFtl2t3f9ygAT6CI= Original-Received: by 10.38.14.48 with SMTP id 48mr23123rnn; Sun, 20 Feb 2005 11:17:17 -0800 (PST) Original-Received: by 10.38.171.26 with HTTP; Sun, 20 Feb 2005 11:17:16 -0800 (PST) Original-To: help-gnu-emacs@gnu.org 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:24198 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:24198 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. I compiled this version from the 21.3.50.1 CVS source as of Dec 30th, 2004. I'm thinking that perhaps I might've missed some compile flag or something? Because I've tested with the fink version 21.3.50.1 and it works without issue, and also with version 21.2.1 which comes with Panther. So it's only this self compiled version that's giving me problems. I would gladly switch back to a previous carbon version, however, there's a problem with lisp.el which prevents sexp-selections from being extended, and it's a feature I need. This has been addressed by 21.3.50.1, although like I said, gdb printf statements don't produce immediate output. So ideally I'd like to find out how to fix this problem with 21.3.50.1 While we're on the subject of using gdb from within emacs, I'm curious if there's any way to suppress the following control characters when using gdb: =1B^[[0K(gdb)=20 =1B^[[2A =1B^[[0Khello, world! I've set --annotate=3D1, and I don't receive any control characters while single stepping, it's only when printing that I receive the characters as mentioned above (the ^[[0K and such). And of course this doesn't happen with version 21.3.50.1, since I can't even get my printf lines to show output. So if anyone has any suggestions, please let me know, I'd really appreciate it. Thanks, Mike P.S. I'm using GNU gdb 5.3-20030128 (Apple version gdb-330.1) with Panther (10.3.4) on a G4 iBook 800mhz if that makes any difference.