This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] Two DW_OP_GNU_variable_value fixes / tweaks


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.

	Jakub


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