From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11441 invoked by alias); 22 Feb 2013 19:32:37 -0000 Received: (qmail 11430 invoked by uid 22791); 22 Feb 2013 19:32:34 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 22 Feb 2013 19:32:26 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1MJWHPs001841 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 22 Feb 2013 14:32:18 -0500 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r1MJWF3O029165 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 22 Feb 2013 14:32:16 -0500 From: Tom Tromey To: Marc Khouzam Cc: "'Yao Qi'" , "'gdb-patches\@sourceware.org'" , "'Pedro Alves'" , "'Joel Brobecker'" , "'Stan Shebs'" Subject: Re: DPrintf feedback References: <1361192891-29341-1-git-send-email-yao@codesourcery.com> Date: Fri, 22 Feb 2013 19:32:00 -0000 In-Reply-To: (Marc Khouzam's message of "Fri, 22 Feb 2013 17:38:50 +0000") Message-ID: <87fw0o87r4.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2013-02/txt/msg00598.txt.bz2 >>>>> "Marc" == Marc Khouzam writes: Marc> Such an approach may also help fix the "continue" problem Marc> that Yao is trying to address. I seem to recall that Hui had posted Marc> patches to add some kind of 'printf' tracepoint command. Maybe that Marc> would be something that can help? I thought this was subsumed by "set dprintf-style agent"? Marc> Other issues I ran across are below. I wasn't sure opening PRs was Marc> the way to do since those issues may disappear if the current Marc> implementation is amended: I think it is best to file PRs. If a patch fixes them all, then that is fine. But if not, then this the only way to avoid losing track. Marc> - Pagination is triggered for dprintf in CLI mode, at least when Marc> using dprintf-style 'gdb'. Maybe we need a new "gdb-unfiltered" setting? Or we could disable pagination entirely here, but that maybe leads to other issues. Marc> - In Eclipse, the dprintf-style that makes sense is either Marc> 'call' or 'agent'. I was surprised to hear this. Could you say why? Marc> - Output buffering is not behaving as a real printf. For Marc> example, if my program does Marc> printf("hello"); Marc> printf("friend\n"); Marc> and I put a dprintf " my " on the second line, Marc> I would expect to see Marc> "hello my friend" Marc> but instead I see Marc> " my hellofriend" Marc> which shows that the dprintf string does not go to the same Marc> buffer as the real printfs, and is flushed earlier. Marc> This also happens with the dprintf-style "agent" Which other setting does this happen with? I would expect it to work with "call" but not with "gdb". You could hack around this by disabling buffering for stdout. I'm not totally sure it is a bug for it to work the current way by default. Tom