This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] testsuite/gdb.dwarf2: Fix for dw2-ifort-parameter failure on ARM


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]