From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32680 invoked by alias); 16 Jan 2014 16:24:00 -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 32668 invoked by uid 89); 16 Jan 2014 16:24:00 -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,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS 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 ESMTP; Thu, 16 Jan 2014 16:23:59 +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 s0GGNtGk017881 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 16 Jan 2014 11:23:55 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s0GGNqa4003973; Thu, 16 Jan 2014 11:23:52 -0500 Message-ID: <52D80798.2050304@redhat.com> Date: Thu, 16 Jan 2014 16:24:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Omair Javaid CC: Yao Qi , gdb-patches@sourceware.org Subject: Re: [PATCH] testsuite/gdb.dwarf2: Fix for dw2-ifort-parameter failure on ARM References: <51E4B587.70007@codesourcery.com> <5280A528.8040308@codesourcery.com> <52D7A05F.6070304@linaro.org> <52D7AAF1.80501@redhat.com> <52D7B3C5.1000702@linaro.org> <52D7D222.9020403@redhat.com> <52D7E4C5.4040504@linaro.org> <52D7E605.4020601@redhat.com> <52D7E9D7.80309@linaro.org> In-Reply-To: <52D7E9D7.80309@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-01/txt/msg00612.txt.bz2 On 01/16/2014 02:16 PM, Omair Javaid wrote: > On Thu 16 Jan 2014 07:00:37 PM PKT, Pedro Alves wrote: >> On 01/16/2014 01:55 PM, Omair Javaid wrote: >>>>> diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.c b/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.c >>>>> index 361c44d..c866b0f 100644 >>>>> --- a/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.c >>>>> +++ b/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.c >>>>> @@ -29,3 +29,9 @@ main (void) >>>>> func (); >>>>> return 0; >>>>> } >>>>> + >>>>> +/* Addresses represented as data symbols, thus without Thumb (etc.) >>>>> + mode bits. The dw2-ifort-parameter-debug.S file uses this as >>>>> + func's low_pc/high_pc. */ >>>>> +extern void *func_addr __attribute__ ((alias ("func"))); >>>>> +extern void *main_addr __attribute__ ((alias ("main"))); >>> Patch doesnt fix the issue and builds after making changes to alias definition like: >> >> Odd. Are you saying the patch didn't build for you? It did for >> me, in Thumb mode, and the debug info I saw looked right (no >> thumb bit). >> >>> extern void func_addr() __attribute__ ((alias ("func"))); >>> extern void main_addr() __attribute__ ((alias ("main"))); >> >> ... >>> but issues remains the same. >> >> That's expected, as the whole point was making a data symbol >> (void *), but that change makes it a function again (thus >> ends up with the thumb bit set again). >> > > I am using gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu9) > Patch fails to build with following error: > > gdb compile failed, ./gdb.dwarf2/dw2-ifort-parameter.c:37:15: error: > 'func_addr' alias in between function and variable is not supported > extern void * func_addr __attribute__ ((alias ("func"))); > ^ > ./gdb.dwarf2/dw2-ifort-parameter.c:23:1: warning: 'func' aliased > declaration [enabled by default] > func (void) > ^ > ./gdb.dwarf2/dw2-ifort-parameter.c:38:15: error: 'main_addr' alias in > between function and variable is not supported > extern void * main_addr __attribute__ ((alias ("main"))); > ^ > ./gdb.dwarf2/dw2-ifort-parameter.c:28:1: warning: 'main' aliased > declaration [enabled by default] > main (void) > ^ OK. Well, it seems to me that the root of this whole test's problem is the exact same as the one being discussed in the "Fix possible alignment issue with dw2-dir-file-name test case" thread, for ppc64. That is, using a function symbol for the function's low_pc/high_pc range is not OK. The way we fix one should fix the other too. -- Pedro Alves