This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Two DW_OP_GNU_variable_value fixes / tweaks
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Biener <rguenther at suse dot de>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 16 May 2017 13:03:17 +0200
- Subject: Re: [PATCH] Two DW_OP_GNU_variable_value fixes / tweaks
- Authentication-results: sourceware.org; auth=none
- References: <alpine.LSU.2.20.1705151439060.20726@zhemvz.fhfr.qr> <20170515131957.GE3567@laptop.zalov.cz>
On Mon, May 15, 2017 at 3:19 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Mon, May 15, 2017 at 02:43:43PM +0200, Richard Biener wrote:
>>
>> While bringing early LTO debug up-to-speed I noticed the following two
>> issues. The first patch avoids useless work in
>> note_variable_value_in_expr and actually makes use of the DIE we
>> eventually create in resolve_variable_value_in_expr.
>>
>> The second avoids generating a DW_OP_GNU_variable_value for a decl
>> we'll never have a DIE for -- this might be less obvious than the
>> other patch but I think we'll also never have any other debug info
>> we can resolve the decl with(?)
>>
>> Bootstrapped and tested the first patch sofar
>> on x86_64-unknown-linux-gnu, 2nd is pending.
>>
>> Ok?
>>
>> Thanks,
>> Richard.
>>
>> 2017-05-15 Richard Biener <rguenther@suse.de>
>>
>> * dwarf2out.c (resolve_variable_value_in_expr): Lookup DIE
>> just generated.
>> (note_variable_value_in_expr): If we resolved the decl ref
>> do not push to the stack.
>
> LGTM.
>
>> 2017-05-15 Richard Biener <rguenther@suse.de>
>>
>> * dwarf2out.c (loc_list_from_tree_1): Do not create
>> DW_OP_GNU_variable_value for DECL_IGNORED_P decls.
>
> Can you verify it e.g. in a bootstrapped cc1plus doesn't change the debug info
> (except for dwarf2out.o itself)?
> It looks reasonable and it would surprise me if did, just want to be sure.
Done. Note it only happened for Ada.
Richard.
> Jakub