The pretty-printed output (emitted by the debugger "pp" command and by command
line switch -gnatdt) was broken for an end span, e.g.
81 (Uint = 81) p.adb:8:11 Then_Statements = List (List_Id=-
99999975)
and now this is printed as:
End_Span = 81 (Uint = 81) p.adb:8:11
Then_Statements = List (List_Id=-
99999975)
No impact on the compilation.
gcc/ada/ChangeLog:
* treepr.adb (Print_End_Span): Print prefix, field name and line break.
procedure Print_Init;
-- Initialize for printing of tree with descendants
- procedure Print_End_Span (N : Node_Id);
+ procedure Print_End_Span
+ (Prefix : String;
+ Field : Node_Field;
+ N : Node_Id);
-- Print contents of End_Span field of node N. The format includes the
-- implicit source location as well as the value of the field.
-- Print_End_Span --
--------------------
- procedure Print_End_Span (N : Node_Id) is
+ procedure Print_End_Span
+ (Prefix : String;
+ Field : Node_Field;
+ N : Node_Id)
+ is
Val : constant Uint := End_Span (N);
begin
+ Write_Str (Prefix);
+ Write_Str (Image (Field) & " = ");
UI_Write (Val);
Write_Str (" (Uint = ");
Write_Str (UI_Image (Val));
if Present (Val) then
Write_Location (End_Location (N));
end if;
+
+ Write_Eol;
end Print_End_Span;
------------------------
-- End_Location.
if Fields (Field_Index) = F_End_Span then
- Print_End_Span (N);
+ Print_End_Span (Prefix, F_End_Span, N);
else
Print_Node_Field