This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] testsuite/gdb.dwarf2: Fix for dw2-ifort-parameter failure on ARM
- From: Pedro Alves <palves at redhat dot com>
- To: Omair Javaid <omair dot javaid at linaro dot org>
- Cc: Yao Qi <yao at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Thu, 16 Jan 2014 16:23:52 +0000
- Subject: Re: [PATCH] testsuite/gdb.dwarf2: Fix for dw2-ifort-parameter failure on ARM
- Authentication-results: sourceware.org; auth=none
- References: <CANW4E-2bQYjx6YdR3qGyKUsQa_KOrtmkWsZYqKzcuQBF==RPpw at mail dot gmail dot com> <CANW4E-25HdXYKMk258iO=GZ=PNM=Zu4jMbstpkSoMgE9wFpmkQ at mail dot gmail dot com> <51E4B587 dot 70007 at codesourcery dot com> <CANW4E-0vd51dTvd5qxUbeDn7ebXV-cf+WS4+VpyyGyD0MYGk8Q at mail dot gmail dot com> <5280A528 dot 8040308 at codesourcery dot com> <52D7A05F dot 6070304 at linaro dot org> <52D7AAF1 dot 80501 at redhat dot com> <52D7B3C5 dot 1000702 at linaro dot org> <52D7D222 dot 9020403 at redhat dot com> <52D7E4C5 dot 4040504 at linaro dot org> <52D7E605 dot 4020601 at redhat dot com> <52D7E9D7 dot 80309 at linaro dot org>
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