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]

[Ada] Front-end support for per-instance coverage analysis


This changes adds circuitry to the front-end that allows the code generated
for different instances of the same generic to be identified in debugging
information. This will subsequently be used to allow per-instance coverage
analysis.

Tested on x86_64-pc-linux-gnu, committed on trunk

2012-10-01  Thomas Quinot  <quinot@adacore.com>

	* sinput.ads, sinput.adb, sinput-l.adb sinput-c.adb (Sinput): New
	Instances table, tracking all generic instantiations. Source file
	attribute Instance replaces previous Instantiation attribute with an
	index into the Instances table.
	(Iterate_On_Instances): New generic procedure.
	(Create_Instantiation_Source): Record instantiations in Instances.
	(Tree_Read, Tree_Write): Read/write the instance table.
	* scils.ads, scos.adb (SCO_Instance_Table): New table, contains
	information copied from Sinput.Instance_Table, but self-contained
	within the SCO data structures.
	* par_sco.ads, par_sco.adb (To_Source_Location): Move to library level.
	(Record_Instance): New subprogram, used by...
	(Populate_SCO_Instance_Table): New subprogram to fill
	the SCO instance table from the Sinput one (called by SCO_Output).
	* opt.ads (Generate_SCO_Instance_Table): New option.
	* put_scos.adb (Write_Instance_Table): New subprogram, used by...
	(Put_SCOs): Dump the instance table at the end of SCO information
	if requested.
	* get_scos.adb (Get_SCOs): Read SCO_Instance_Table.
	* types.h: Add declaration for Instance_Id.
	* back_end.adb (Call_Back_End): Pass instance ids in source file
	information table.
	(Scan_Back_End_Switches): -fdebug-instances sets
	Opt.Generate_SCO_Instance_Table.
	* gcc-interface/gigi.h: File_Info_Type includes instance id.
	* gcc-interface/trans.c: Under -fdebug-instances, set instance
	id in line map from same in file info.

Attachment: difs
Description: Text document


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