[Ada] Add debugging message

Message ID 20200609081006.GA73830@adacore.com
State New
Headers show
  • [Ada] Add debugging message
Related show

Commit Message

Pierre-Marie de Rodat June 9, 2020, 8:10 a.m.
When raising Program_Error due to an incorrect Kind transition, print a
more informative debugging message.

Tested on x86_64-pc-linux-gnu, committed on trunk

2020-06-09  Bob Duff  <duff@adacore.com>


	* bindo-graphs.adb (Add_Edge_Kind_Check): Add the Image of the
	old and new Kinds to the raise Program_Error message.


--- gcc/ada/bindo-graphs.adb
+++ gcc/ada/bindo-graphs.adb
@@ -1824,7 +1824,7 @@  package body Bindo.Graphs is
          end case;
          if not OK then
-            raise Program_Error;
+            raise Program_Error with Kind'Img & "-->" & Attributes.Kind'Img;
          end if;
       end Add_Edge_Kind_Check;