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: Pedro Alves <palves at redhat dot com>
- To: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- Cc: Edjunior Barbosa Machado <emachado at linux dot vnet dot ibm dot com>, Jan Kratochvil <jan dot kratochvil at redhat dot com>, 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>
- Date: Fri, 17 Jan 2014 18:09:30 +0000
- 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> <87mwj352p5 dot fsf at br87z6lw dot de dot ibm dot com> <20140110145327 dot GA23695 at host2 dot jankratochvil dot net> <52D014B7 dot 6040305 at redhat dot com> <52D6FEA9 dot 6010605 at linux dot vnet dot ibm dot com> <52D7EEA9 dot 4030006 at redhat dot com> <874n5232yj dot fsf at br87z6lw dot de dot ibm dot com>
On 01/17/2014 05:58 PM, Andreas Arnez wrote:
> On Thu, Jan 16 2014, Pedro Alves wrote:
>
>> On 01/15/2014 09:33 PM, Edjunior Barbosa Machado wrote:
>>>
>>
>>>> testsuite/
>>>> 2014-01-10 Andreas Arnez <arnez@linux.vnet.ibm.com>
>>>> Pedro Alves <palves@redhat.com>
>>>>
>>>> * gdb.dwarf2/dw2-dir-file-name.c (FUNC): Remove "*_start" symbol.
>>>> Make "name" extern.
>>>> * gdb.dwarf2/dw2-dir-file-name.exp (out_cu, out_line): Replace
>>>> references to ${name}_start by references to ${name}.
>>>
>>> For some reason, the testcase is no longer successful on ppc64 (although it
>>> still passes on ppc32): it hits the breakpoints, but no longer shows the
>>> filename in none of the tests.
>>>
>>> From gdb.log:
>>> ...
>>> (gdb) break compdir_missing__ldir_missing__file_basename
>>> Breakpoint 2 at 0x100006c4
>>> (gdb) continue
>>> Continuing.
>>>
>>> Breakpoint 2, 0x00000000100006c4 in .compdir_missing.ldir_missing.file_basename ()
>>
>> Bah, looks like the function's low_pc ends up pointing to the function
>> descriptor (because that's what the "name" symbol resolves to in the
>> debug info in the .S file)? Looks like we'll need some other solution.
>
> OK, how about this?
Nice and simple. I like it.
> ----
> Subject: [PATCH] Re-introduce '_start' labels and add alignment in dw2-dir-file-name test case.
>
> On ppc64-linux a function symbol does not point to code, but to the
> function descriptor. Thus the previous change for this test case
> broke it:
>
> https://sourceware.org/ml/gdb-patches/2014-01/msg00275.html
>
> This patch reverts to the original method, re-introducing '_start'
> symbols. In addition, it adds sufficient alignment before the label,
> such that the label never points into an alignment gap.
>
> testsuite/
> 2014-01-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
>
> * gdb.dwarf2/dw2-dir-file-name.c (FUNC): Insert alignment and
> define "*_start" label. Make "name" static.
>
No empty line here please.
> * gdb.dwarf2/dw2-dir-file-name.exp: Replace references to
> ${name} by references to ${name}_start.
--
Pedro Alves