aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorRichard Kenner <kenner@adacore.com>2020-08-24 09:09:49 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2020-10-22 08:11:26 -0400
commit44b9c6715c6e8a244adc5129f90440d4e3cdf1b7 (patch)
tree45321ee7aee2ee70ec86f723eeb5374e1dc7ef14 /gcc/ada
parent47c53b0a23f20af9d30f44109714871bff8908cd (diff)
downloadgcc-44b9c6715c6e8a244adc5129f90440d4e3cdf1b7.zip
gcc-44b9c6715c6e8a244adc5129f90440d4e3cdf1b7.tar.gz
gcc-44b9c6715c6e8a244adc5129f90440d4e3cdf1b7.tar.bz2
[Ada] Allow use of debug routines when output is going elsewhere
gcc/ada/ * sprint.adb (pg, po, ps): Use {Push,Pop}_Output. * treepr.adb (pl, pn): Likewise.
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/sprint.adb9
-rw-r--r--gcc/ada/treepr.adb9
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb
index 774bcf7..d71c415 100644
--- a/gcc/ada/sprint.adb
+++ b/gcc/ada/sprint.adb
@@ -420,6 +420,8 @@ package body Sprint is
Dump_Original_Only := False;
Dump_Freeze_Null := True;
Current_Source_File := No_Source_File;
+ Push_Output;
+ Set_Standard_Output;
if Arg in List_Range then
Sprint_Node_List (List_Id (Arg), New_Lines => True);
@@ -432,6 +434,7 @@ package body Sprint is
end if;
Write_Eol;
+ Pop_Output;
end pg;
--------
@@ -444,6 +447,8 @@ package body Sprint is
Dump_Original_Only := True;
Dump_Freeze_Null := False;
Current_Source_File := No_Source_File;
+ Push_Output;
+ Set_Standard_Output;
if Arg in List_Range then
Sprint_Node_List (List_Id (Arg), New_Lines => True);
@@ -456,6 +461,7 @@ package body Sprint is
end if;
Write_Eol;
+ Pop_Output;
end po;
----------------------
@@ -477,6 +483,8 @@ package body Sprint is
Dump_Original_Only := False;
Dump_Freeze_Null := False;
Current_Source_File := No_Source_File;
+ Push_Output;
+ Set_Standard_Output;
if Arg in List_Range then
Sprint_Node_List (List_Id (Arg), New_Lines => True);
@@ -489,6 +497,7 @@ package body Sprint is
end if;
Write_Eol;
+ Pop_Output;
end ps;
--------------------
diff --git a/gcc/ada/treepr.adb b/gcc/ada/treepr.adb
index d902ab8..ee1b3ba 100644
--- a/gcc/ada/treepr.adb
+++ b/gcc/ada/treepr.adb
@@ -264,6 +264,9 @@ package body Treepr is
Lid : Int;
begin
+ Push_Output;
+ Set_Standard_Output;
+
if L < 0 then
Lid := L;
@@ -292,6 +295,7 @@ package body Treepr is
-- Now output the list
Print_Tree_List (List_Id (Lid));
+ Pop_Output;
end pl;
--------
@@ -300,6 +304,9 @@ package body Treepr is
procedure pn (N : Union_Id) is
begin
+ Push_Output;
+ Set_Standard_Output;
+
case N is
when List_Low_Bound .. List_High_Bound - 1 =>
pl (Int (N));
@@ -332,6 +339,8 @@ package body Treepr is
Write_Int (Int (N));
Write_Eol;
end case;
+
+ Pop_Output;
end pn;
--------