r260868 - in /trunk/gcc/ada: ChangeLog doc/gnat...

pmderodat@gcc.gnu.org pmderodat@gcc.gnu.org
Tue May 29 09:37:00 GMT 2018


Author: pmderodat
Date: Tue May 29 09:36:51 2018
New Revision: 260868

URL: https://gcc.gnu.org/viewcvs?rev=260868&root=gcc&view=rev
Log:
[Ada] Implement machine parsable format for -gnatR output

This adds a new variant to the -gnatR switch, namely -gnatRj, which causes
the compiler to output representation information to a file in the JSON
data interchange format.  It can be combined with -gnatR0/1/2/3/m (but is
incompatible with -gnaRe and -gnatRs).

The information output in this mode is a superset of that output in the
traditional -gnatR mode, but is otherwise equivalent for the common part.

2018-05-29  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* doc/gnat_ugn/building_executable_programs_with_gnat.rst (Alphabetical
	List of All Switches): Document -gnatRj.
	(Debugging Control): Likewise.
	* gnat_ugn.texi: Regenerate.
	* opt.ads (List_Representation_Info_To_JSON): New boolean variable.
	* osint-c.adb (Create_Repinfo_File): Use the .json instead of .rep
	extension if List_Representation_Info_To_JSON is true.
	* repinfo.ads: Document the JSON output format.
	* repinfo.adb (List_Location): New procedure.
	(List_Array_Info): Add support for JSON output.
	(List_Entities): Likewise.
	(Unop): Likewise.
	(Binop): Likewise.
	(Print_Expr): Likewise.
	(List_Linker_Section): Likewise.
	(List_Mechanisms): Likewise.
	(List_Name): Likewise.
	(List_Object_Info): Likewise.
	(List_Record_Info): Likewise.
	(List_Component_Layout): Likewise.  Add Indent parameter.
	(List_Structural_Record_Layout): New procedure.
	(List_Attr): Add support for JSON output.
	(List_Type_Info): Likewise.
	(Write_Unknown_Val): Likewise.
	* switch-c.adb (Scan_Front_End_Switches) <R>: Deal with 'j'.
	* usage.adb (Usage): List -gnatRj.

Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
    trunk/gcc/ada/gnat_ugn.texi
    trunk/gcc/ada/opt.ads
    trunk/gcc/ada/osint-c.adb
    trunk/gcc/ada/repinfo.adb
    trunk/gcc/ada/repinfo.ads
    trunk/gcc/ada/switch-c.adb
    trunk/gcc/ada/usage.adb



More information about the Gcc-cvs mailing list