From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 84242 invoked by alias); 3 May 2015 14:06:12 -0000 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 Received: (qmail 84232 invoked by uid 89); 3 May 2015 14:06:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sun, 03 May 2015 14:06:10 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t43E69EG018818 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Sun, 3 May 2015 10:06:09 -0400 Received: from host1.jankratochvil.net (ovpn-116-27.ams2.redhat.com [10.36.116.27]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t43E663i024022 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 3 May 2015 10:06:08 -0400 Date: Sun, 03 May 2015 14:06:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: gdb-patches@sourceware.org, Phil Muldoon Subject: Re: [PATCH v3 8/9] compile: New compile printf Message-ID: <20150503140605.GC18394@host1.jankratochvil.net> References: <20150411194322.29128.52477.stgit@host1.jankratochvil.net> <20150411194429.29128.61494.stgit@host1.jankratochvil.net> <5540FE29.5050004@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5540FE29.5050004@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00024.txt.bz2 On Wed, 29 Apr 2015 17:52:09 +0200, Pedro Alves wrote: > The usefulness of "compile printf" > specifically isn't as immediately clear though. I think the manual > should say something about why you want to use "compile printf" over > the alternatives. (Edit: Ah, I see that's in the next patch.) I do not know, I have never used the existing GDB printf command myself. GDB Manual could describe what the existing GDB printf command is good for. IMO in the cases where one needs the printf command one already has to use some extension language (such as Python) which can do that on its own. This patch was created upon request by Phil. > The main advantage is that after the next patch, the output always > appears in gdb's console, while "compile code printf" works just like > (gdb) print printf (...) > meaning, in the "compile the output should go to the inferior's stdout. > > Or is there another advantage I missed, perhaps? This patch is just to split it to two mails for review. I do not think it makes sense on its own, it messes up debugging output with inferior output. > But can give an example of why you'd want to set "set compile-printf-args" > differently to "set compile-args" ? I do not know exactly myself but currently there is already: + compile_printf_args = xstrdup ("-Werror=format"); so one may need to modify that for whatever reason. I do not think there should be non-overridable GCC options. > Some FIXMEs here. Fixed: _("Set compile printf command " "GCC command-line arguments"), _("Show compile printf command " "GCC command-line arguments"), Thanks, Jan