[Ada] Handle -gx switches explicitly
authorArnaud Charlet <charlet@adacore.com>
Wed, 14 Nov 2018 11:40:09 +0000 (11:40 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Wed, 14 Nov 2018 11:40:09 +0000 (11:40 +0000)
2018-11-14  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

* adabkend.adb (Scan_Back_End_Switches): Handle -gx switches
explicitly.

From-SVN: r266108

gcc/ada/ChangeLog
gcc/ada/adabkend.adb

index 5577ddb485851d88c3e8870b32627431aa165753..f6e996e47805a86ae00558158606a5a0b0fcc6e2 100644 (file)
@@ -1,3 +1,8 @@
+2018-11-14  Arnaud Charlet  <charlet@adacore.com>
+
+       * adabkend.adb (Scan_Back_End_Switches): Handle -gx switches
+       explicitly.
+
 2018-11-13  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc-interface/misc.c (gnat_init_gcc_eh): Set -fnon-call-exceptions
index 738854f1b292bfddb1784f789d98e4bd3a6d2745..36665f615ebe39c13e70934453d207160190b1eb 100644 (file)
@@ -186,6 +186,26 @@ package body Adabkend is
             Opt.Suppress_Control_Flow_Optimizations := True;
             return;
 
+         --  Recognize -gxxx switches
+
+         elsif Switch_Chars (First) = 'g' then
+            Debugger_Level := 2;
+
+            if First < Last then
+               case Switch_Chars (First + 1) is
+                  when '0' =>
+                     Debugger_Level := 0;
+                  when '1' =>
+                     Debugger_Level := 1;
+                  when '2' =>
+                     Debugger_Level := 2;
+                  when '3' =>
+                     Debugger_Level := 3;
+                  when others =>
+                     null;
+               end case;
+            end if;
+
          --  Ignore all other back end switches
 
          elsif Is_Back_End_Switch (Switch_Chars) then