On Fri, Oct 21, 2016 at 02:38:11PM -0600, Tom Tromey wrote:
> >>>>> "Jakub" == Jakub Jelinek <ja...@redhat.com> writes:
> 
> Jakub> Also, as this effectively requires the latest unreleased GDB under the
> Jakub> default options for something that has been working previously, I 
> wonder
> Jakub> if it e.g. for some time shouldn't be guarded with dwarf_version >= 5
> 
> Here's what that looks like.

LGTM.

> commit 7865ede46e519fa6bc3d6367f943a40179b4d380
> Author: Tom Tromey <t...@tromey.com>
> Date:   Thu Oct 20 17:03:35 2016 -0600
> 
>     PR debug/77315 - use DW_OP_form_tls_address
>     
>     This patch changes gcc to emit DW_OP_form_tls_address rather than
>     DW_OP_GNU_push_tls_address.  This is PR debug/77315.
>     
>     DW_OP_form_tls_address was added in DWARF 3.  However, this patch checks
>     for DWARF version 5 or above to decide which opcode to emit, because gdb
>     did not implement the DWARF 3 opcode until recently -- not until after
>     7.12.  This approach seems safest because DWARF 5 is also going to
>     require other gdb changes.
>     
>     Built and regtested on x86-64 Fedora 24.
>     
>     2016-10-21  Tom Tromey  <t...@tromey.com>
>     
>       PR debug/77315:
>       * dwarf2out.c (mem_loc_descriptor): Use DW_OP_form_tls_address.
>       (resolve_args_picking_1): Move DW_OP_form_tls_address case next to
>       DW_OP_GNU_push_tls_address case.
>       (loc_list_from_tree_1): Use DW_OP_form_tls_address.

        Jakub

Reply via email to