Commit 6592d14b by Pierre-Marie de Rodat Committed by Pierre-Marie de Rodat

Add a flag to control the balance between GNAT encodings and std. DWARF

In order to accomodate the debugger's support evolution for "new" DWARF
constructs, we need to have an flag that controls the amount of GNAT
encodings/standard DWARF information that is emitted in the debug info.
Propagate this new parameter into the Ada front-end.

gcc/ChangeLog:

	* common.opt (gnat_encodings): New variable
	(dwarf_gnat_encodings): New enum type.
	(fgnat_encodings): New option.
	* flag-types.h (enum dwarf_gnat_encodings): New.

gcc/ada/ChangeLog:

	* gcc-interface/misc.c (gnat_encodings): Undefine macro and
	declare a global variable.
	(gnat_post_options): Initialize this global from options.

From-SVN: r231761
parent 70decafb
2015-12-17 Pierre-Marie de Rodat <derodat@adacore.com>
* common.opt (gnat_encodings): New variable
(dwarf_gnat_encodings): New enum type.
(fgnat_encodings): New option.
* flag-types.h (enum dwarf_gnat_encodings): New.
2015-12-17 Christian Bruel <christian.bruel@st.com> 2015-12-17 Christian Bruel <christian.bruel@st.com>
* tree.h (TYPE_MODE_RAW): New macro. * tree.h (TYPE_MODE_RAW): New macro.
2015-12-17 Pierre-Marie de Rodat <derodat@adacore.com>
* gcc-interface/misc.c (gnat_encodings): Undefine macro and
declare a global variable.
(gnat_post_options): Initialize this global from options.
2015-12-10 Eric Botcazou <ebotcazou@adacore.com> 2015-12-10 Eric Botcazou <ebotcazou@adacore.com>
PR ada/48013 PR ada/48013
......
...@@ -68,7 +68,8 @@ extern const char **gnat_argv; ...@@ -68,7 +68,8 @@ extern const char **gnat_argv;
/* Ada code requires variables for these settings rather than elements /* Ada code requires variables for these settings rather than elements
of the global_options structure because they are imported. */ of the global_options structure because they are imported. */
int gnat_encodings = 0; #undef gnat_encodings
enum dwarf_gnat_encodings gnat_encodings = DWARF_GNAT_ENCODINGS_DEFAULT;
#undef optimize #undef optimize
int optimize; int optimize;
...@@ -276,6 +277,7 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED) ...@@ -276,6 +277,7 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED)
"supported anymore"); "supported anymore");
/* Copy global settings to local versions. */ /* Copy global settings to local versions. */
gnat_encodings = global_options.x_gnat_encodings;
optimize = global_options.x_optimize; optimize = global_options.x_optimize;
optimize_size = global_options.x_optimize_size; optimize_size = global_options.x_optimize_size;
flag_compare_debug = global_options.x_flag_compare_debug; flag_compare_debug = global_options.x_flag_compare_debug;
......
...@@ -167,6 +167,11 @@ bool flag_stack_usage_info = false ...@@ -167,6 +167,11 @@ bool flag_stack_usage_info = false
Variable Variable
int flag_debug_asm int flag_debug_asm
; Balance between GNAT encodings and standard DWARF to emit.
Variable
enum dwarf_gnat_encodings gnat_encodings = DWARF_GNAT_ENCODINGS_DEFAULT
; -dP causes the rtl to be emitted as a comment in assembly. ; -dP causes the rtl to be emitted as a comment in assembly.
Variable Variable
int flag_dump_rtl_in_asm int flag_dump_rtl_in_asm
...@@ -1337,6 +1342,22 @@ Common Report Var(flag_gcse_after_reload) Optimization ...@@ -1337,6 +1342,22 @@ Common Report Var(flag_gcse_after_reload) Optimization
Perform global common subexpression elimination after register allocation has Perform global common subexpression elimination after register allocation has
finished. finished.
Enum
Name(dwarf_gnat_encodings) Type(int)
EnumValue
Enum(dwarf_gnat_encodings) String(all) Value(DWARF_GNAT_ENCODINGS_ALL)
EnumValue
Enum(dwarf_gnat_encodings) String(gdb) Value(DWARF_GNAT_ENCODINGS_GDB)
EnumValue
Enum(dwarf_gnat_encodings) String(minimal) Value(DWARF_GNAT_ENCODINGS_MINIMAL)
fgnat-encodings=
Common Enum(dwarf_gnat_encodings) Joined RejectNegative Report Undocumented Var(gnat_encodings)
-fgnat-encodings=[all|gdb|minimal] Select the balance between GNAT encodings and standard DWARF emitted in the debug information
; This option is not documented yet as its semantics will change. ; This option is not documented yet as its semantics will change.
fgraphite fgraphite
Common Report Var(flag_graphite) Optimization Common Report Var(flag_graphite) Optimization
......
...@@ -1488,4 +1488,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -1488,4 +1488,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#endif /* GCC_INSN_FLAGS_H */ #endif /* GCC_INSN_FLAGS_H */
#ifndef DWARF_GNAT_ENCODINGS_DEFAULT
#define DWARF_GNAT_ENCODINGS_DEFAULT DWARF_GNAT_ENCODINGS_GDB
#endif
#endif /* ! GCC_DEFAULTS_H */ #endif /* ! GCC_DEFAULTS_H */
...@@ -91,6 +91,21 @@ enum debug_struct_file ...@@ -91,6 +91,21 @@ enum debug_struct_file
DINFO_STRUCT_FILE_ANY /* Debug structs defined in all files. */ DINFO_STRUCT_FILE_ANY /* Debug structs defined in all files. */
}; };
/* Balance between GNAT encodings and standard DWARF to emit. */
enum dwarf_gnat_encodings
{
DWARF_GNAT_ENCODINGS_ALL = 0, /* Emit all GNAT encodings, then emit as
much standard DWARF as possible so it
does not conflict with GNAT
encodings. */
DWARF_GNAT_ENCODINGS_GDB = 1, /* Emit as much standard DWARF as possible
as long as GDB handles them. Emit GNAT
encodings for the rest. */
DWARF_GNAT_ENCODINGS_MINIMAL = 2 /* Emit all the standard DWARF we can.
Emit GNAT encodings for the rest. */
};
/* Enumerate Objective-c instance variable visibility settings. */ /* Enumerate Objective-c instance variable visibility settings. */
enum ivar_visibility enum ivar_visibility
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment