]> gcc.gnu.org Git - gcc.git/commitdiff
[Ada] Document the -fgnat-encodings switch
authorPierre-Marie de Rodat <derodat@adacore.com>
Tue, 11 Dec 2018 11:09:13 +0000 (11:09 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 11 Dec 2018 11:09:13 +0000 (11:09 +0000)
2018-12-11  Pierre-Marie de Rodat  <derodat@adacore.com>

gcc/ada/

* doc/gnat_ugn/building_executable_programs_with_gnat.rst:
Document the -fgnat-encodings switch.
* gnat_ugn.texi: Regenerate.

From-SVN: r266979

gcc/ada/ChangeLog
gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
gcc/ada/gnat_ugn.texi

index b190949b9583e0e607489809eceb666bc46b56b0..5ff08a54194bc24ac85993c0211a1f49e99c9197 100644 (file)
@@ -1,3 +1,9 @@
+2018-12-11  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+       * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
+       Document the -fgnat-encodings switch.
+       * gnat_ugn.texi: Regenerate.
+
 2018-12-11  Justin Squirek  <squirek@adacore.com>
 
        * sem_ch10.adb (Analyze_Subunit): Modify conditional to fully
index 1b69bdd457a82c41c77ae15290bb40bf3064c003..b5363dada9772580cd2e38fc0d3899b567c21c37 100644 (file)
@@ -1243,6 +1243,13 @@ Alphabetical List of All Switches
   :file:`scos.adb`.
 
 
+.. index:: -fgnat-encodings  (gcc)
+
+:switch:`-fgnat-encodings=[all|gdb|minimal]`
+  This switch controls the balance between GNAT encodings and standard DWARF
+  emitted in the debug information.
+
+
 .. index:: -flto  (gcc)
 
 :switch:`-flto[={n}]`
@@ -5915,6 +5922,36 @@ Debugging Control
   suppresses this information. This saves some space and may slightly
   speed up compilation, but means that these tools cannot be used.
 
+
+.. index:: -fgnat-encodings  (gcc)
+
+:switch:`-fgnat-encodings=[all|gdb|minimal]`
+  This switch controls the balance between GNAT encodings and standard DWARF
+  emitted in the debug information.
+
+  Historically, old debug formats like stabs were not powerful enough to
+  express some Ada types (for instance, variant records or fixed-point types).
+  To work around this, GNAT introduced proprietary encodings that embed the
+  missing information ("GNAT encodings").
+
+  Recent versions of the DWARF debug information format are now able to
+  correctly describe most of these Ada constructs ("standard DWARF"). As
+  third-party tools started to use this format, GNAT has been enhanced to
+  generate it. However, most tools (including GDB) are still relying on GNAT
+  encodings.
+
+  To support all tools, GNAT needs to be versatile about the balance between
+  generation of GNAT encodings and standard DWARF. This is what
+  :switch:`-fgnat-encodings` is about.
+
+  * ``=all``: Emit all GNAT encodings, and then emit as much standard DWARF as
+    possible so it does not conflict with GNAT encodings.
+  * ``=gdb``: Emit as much standard DWARF as possible as long as the current
+    GDB handles it. Emit GNAT encodings for the rest.
+  * ``=minimal``: Emit as much standard DWARF as possible and emit GNAT
+    encodings for the rest.
+
+
 .. _Exception_Handling_Control:
 
 Exception Handling Control
index d28d53dc7fa65e1020a59f92f140d1c4215d5e4d..9e2138e9cf7b897e93afb09e2ede10cd9250c66d 100644 (file)
@@ -21,7 +21,7 @@
 
 @copying
 @quotation
-GNAT User's Guide for Native Platforms , Nov 09, 2018
+GNAT User's Guide for Native Platforms , Dec 05, 2018
 
 AdaCore
 
@@ -8809,6 +8809,17 @@ in the compiler sources for details in files @code{scos.ads} and
 @code{scos.adb}.
 @end table
 
+@geindex -fgnat-encodings (gcc)
+
+
+@table @asis
+
+@item @code{-fgnat-encodings=[all|gdb|minimal]}
+
+This switch controls the balance between GNAT encodings and standard DWARF
+emitted in the debug information.
+@end table
+
 @geindex -flto (gcc)
 
 
@@ -15174,6 +15185,48 @@ suppresses this information. This saves some space and may slightly
 speed up compilation, but means that these tools cannot be used.
 @end table
 
+@geindex -fgnat-encodings (gcc)
+
+
+@table @asis
+
+@item @code{-fgnat-encodings=[all|gdb|minimal]}
+
+This switch controls the balance between GNAT encodings and standard DWARF
+emitted in the debug information.
+
+Historically, old debug formats like stabs were not powerful enough to
+express some Ada types (for instance, variant records or fixed-point types).
+To work around this, GNAT introduced proprietary encodings that embed the
+missing information ("GNAT encodings").
+
+Recent versions of the DWARF debug information format are now able to
+correctly describe most of these Ada constructs ("standard DWARF"). As
+third-party tools started to use this format, GNAT has been enhanced to
+generate it. However, most tools (including GDB) are still relying on GNAT
+encodings.
+
+To support all tools, GNAT needs to be versatile about the balance between
+generation of GNAT encodings and standard DWARF. This is what
+@code{-fgnat-encodings} is about.
+
+
+@itemize *
+
+@item 
+@code{=all}: Emit all GNAT encodings, and then emit as much standard DWARF as
+possible so it does not conflict with GNAT encodings.
+
+@item 
+@code{=gdb}: Emit as much standard DWARF as possible as long as the current
+GDB handles it. Emit GNAT encodings for the rest.
+
+@item 
+@code{=minimal}: Emit as much standard DWARF as possible and emit GNAT
+encodings for the rest.
+@end itemize
+@end table
+
 @node Exception Handling Control,Units to Sources Mapping Files,Debugging Control,Compiler Switches
 @anchor{gnat_ugn/building_executable_programs_with_gnat id28}@anchor{114}@anchor{gnat_ugn/building_executable_programs_with_gnat exception-handling-control}@anchor{115}
 @subsection Exception Handling Control
This page took 0.111686 seconds and 5 git commands to generate.