From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68845 invoked by alias); 23 Apr 2015 21:56:40 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 68834 invoked by uid 89); 23 Apr 2015 21:56:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.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; Thu, 23 Apr 2015 21:56:38 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t3NLuakF016902 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 23 Apr 2015 17:56:37 -0400 Received: from localhost.localdomain (ovpn-113-113.phx2.redhat.com [10.3.113.113]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3NLuaXB002324; Thu, 23 Apr 2015 17:56:36 -0400 Message-ID: <55396A94.4060908@redhat.com> Date: Thu, 23 Apr 2015 21:56:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Jan Kratochvil , gcc-patches@gcc.gnu.org CC: Phil Muldoon Subject: Re: [PATCH v2 2/4] libcc1: set debug compile: Display GCC driver filename References: <20150423203827.23973.72954.stgit@host1.jankratochvil.net> <20150423203834.23973.8401.stgit@host1.jankratochvil.net> In-Reply-To: <20150423203834.23973.8401.stgit@host1.jankratochvil.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg01455.txt.bz2 On 04/23/2015 02:38 PM, Jan Kratochvil wrote: > Hi, > > already approved, reposting just to keep it a part of the series: > https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01301.html > > As discussed in > How to use compile & execute function in GDB > https://sourceware.org/ml/gdb/2015-04/msg00026.html > > GDB currently searches for /usr/bin/ARCH-OS-gcc and chooses one but it does not > display which one. It cannot, GCC method set_arguments() does not yet know > whether 'set debug compile' is enabled or not. > > Unfortunately this changes libcc1 API in an incompatible way. There is > a possibility of a hack to keep the API the same - one could pass "-v" option > explicitly to set_arguments(), set_arguments() could compare the "-v" string > and print the GCC filename accordingly. Then the 'verbose' parameter of > compile() would lose its meaning. What do you think? > > GDB counterpart: > [PATCH v2 1/2] compile: set debug compile: Display GCC driver filename > https://sourceware.org/ml/gdb-patches/2015-04/msg00909.html > Message-ID: <20150423203402.23140.92757.stgit@host1.jankratochvil.net> > > > Jan > > > include/ChangeLog > 2015-04-23 Jan Kratochvil > > * gcc-interface.h (enum gcc_base_api_version): Add comment to > GCC_FE_VERSION_1. > (struct gcc_base_vtable): Rename set_arguments to set_arguments_v0. > Update comment for compile. New method set_arguments. > > libcc1/ChangeLog > 2015-04-23 Jan Kratochvil > > * libcc1.cc: Include intl.h. > (struct libcc1): Add field verbose. > (libcc1::libcc1): Initialize it. > (libcc1_set_arguments): Add parameter verbose, implement it. > (libcc1_set_arguments_v0): New function. > (libcc1_compile): Set parameter verbose to SELF. > (vtable): Use libcc1_set_arguments_v0 and add libcc1_set_arguments. OK. jeff