This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix possible alignment issue with dw2-dir-file-name test case
- From: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org, Ulrich Weigand <uweigand at de dot ibm dot com>, Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>, jan dot kratochvil at redhat dot com
- Date: Fri, 10 Jan 2014 15:30:46 +0100
- Subject: Re: [PATCH] Fix possible alignment issue with dw2-dir-file-name test case
- Authentication-results: sourceware.org; auth=none
- References: <87a9f65p73 dot fsf at br87z6lw dot de dot ibm dot com> <52CFD97A dot 4040009 at redhat dot com>
On Fri, Jan 10 2014, Pedro Alves wrote:
> On 01/08/2014 06:00 PM, Andreas Arnez wrote:
>> Since upstream gcc has recently increased the function alignment on
>> S390, the dw2-dir-file-name test case fails in the first
>> gdb_continue_to_breakpoint. Indeed, the breakpoint is now placed into
>> the alignment gap *before* the actual function.
>>
>> This happens because the test case declares the respective "*_start"
>> symbol as a "loose" label before the function definition, and the
>> compiler inserts the alignment between that label and the function
>> itself. The fix defines the "*_start" symbol as a global alias to the
>> function instead.
>
> It seems the _start symbol only needs to exist because
> the functions were declared static:
>
>> -#define FUNC(name) \
>> - asm (#name "_start: .globl " #name "_start\n"); \
>> - static void \
>> - name (void) \
>
> But I see nothing that needs them to be static. This
> seems simpler to me:
It's certainly simpler. Maybe Jan can explain why the functions had
been declared static?
Your patch fixes the FAILs for me, so if there's no reason for the
static-ness, then I agree we should go with that.