[Ada] Fix various debug info issues with renaming

Eric Botcazou ebotcazou@adacore.com
Tue Oct 11 10:38:00 GMT 2016


GNAT encodings for object renamings that involve packed private types were not 
generated.  This is because we were not using Underlying_Type to analyze types 
involved.  This patch introduces Underlying_Type calls where necessary.  It 
also generates GNAT encodings renamings for byte unaligned objects, because 
gigi will not be able to materialize renamings when the object is not aligned 
on byte boundaries, so for the moment the only option to make it available in 
the debugger is to use GNAT encodings.  The rest is the materialization of 
renamings at -O0 in gigi.

Tested on x86_64-suse-linux, applied on the mainline.


2016-10-11  Pierre-Marie de Rodat  <derodat@adacore.com>

	* exp_dbug.adb (Debug_Renaming_Declaration): Process underlying types.
	Emit GNAT encodings for object renamings involving record components
	whose normalized bit offset is not null.
	* uintp.h (UI_No_Uint): Declare.
	* gcc-interface/gigi.h (can_materialize_object_renaming_p): New.
	* gcc-interface/utils.c (can_materialize_object_renaming_p): New
	function.
	* gcc-interface/trans.c (gnat_to_gnu)
	<N_Object_Renaming_Declaration>: In code generation mode,
	materialize all renamings as long as they need debug info and we
	are not optimizing.

-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 6202 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161011/a9906a79/attachment.bin>


More information about the Gcc-patches mailing list