From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88543 invoked by alias); 5 Jun 2018 20:50:03 -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 88365 invoked by uid 89); 5 Jun 2018 20:50:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 spammy=sk:psymbol, sk:PSYMBOL, Hx-languages-length:1057 X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 05 Jun 2018 20:50:00 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id w55KnsY7003709 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 5 Jun 2018 16:49:59 -0400 Received: by simark.ca (Postfix, from userid 112) id 453811E530; Tue, 5 Jun 2018 16:49:54 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id B4F5F1E4F7; Tue, 5 Jun 2018 16:49:53 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 05 Jun 2018 20:50:00 -0000 From: Simon Marchi To: Tom Tromey Cc: Keith Seitz , gdb-patches@sourceware.org Subject: Re: [RFA 3/6] Make PSYMBOL_VALUE_ADDRESS take objfile argument In-Reply-To: <87lgbyb4ns.fsf@tromey.com> References: <20180503223621.22544-1-tom@tromey.com> <20180503223621.22544-4-tom@tromey.com> <1a874bc2-1a4d-3dd5-4718-10b93d5d2868@redhat.com> <87lgbyb4ns.fsf@tromey.com> Message-ID: <48fc1440d8164cd365fb2d5bfc8ba437@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Tue, 5 Jun 2018 20:49:54 +0000 X-IsSubscribed: yes X-SW-Source: 2018-06/txt/msg00127.txt.bz2 On 2018-06-01 17:03, Tom Tromey wrote: >>>>>> "Keith" == Keith Seitz writes: > > Keith> Just a word of warning: ANOFFSET will assert if PSYMBOL_SECTION > is > Keith> -1. [Setting that field isn't added until the last patch.] As a > Keith> result, I am seeing a lot of temporary regressions. I build with > -O0, > Keith> so maybe these won't show up during a buildbot test run? > > Maybe they would, and anyway it seems like bad form to rely on this > being optimized out. > > Since the goal here is just to do some syntax checking maybe there is > another form that could be used, like > > (0 ? 0 : (ANOFFSET ((objfile)->section_offsets, > ((symbol)->pginfo.section)))) > > Not sure if that will trigger warnings, but I can find out. > > If that doesn't work one idea would be to just drop it from the patch, > since it has done its job already. > > Tom Or change these macros to be functions :). Types will be properly checked even though the parameter is unused. Simon