diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-09-30 06:23:05 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-10-02 20:49:37 +0200 |
commit | d89c552898c85e2b8f55310f969ec2c179de7040 (patch) | |
tree | f4a1c06e858a0162acdf761b8faf30be5dc4dc89 | |
parent | a546bd6c27f974b85ad2a36ac6b96fa5916b3be2 (diff) | |
download | ghdl-d89c552898c85e2b8f55310f969ec2c179de7040.tar.gz ghdl-d89c552898c85e2b8f55310f969ec2c179de7040.tar.bz2 ghdl-d89c552898c85e2b8f55310f969ec2c179de7040.zip |
libraries: add debug traces.
-rw-r--r-- | src/libraries.adb | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/libraries.adb b/src/libraries.adb index f84a36304..d12947d53 100644 --- a/src/libraries.adb +++ b/src/libraries.adb @@ -382,12 +382,15 @@ package body Libraries is return Get_Identifier; end String_To_Name_Id; + Trace_Library_Load : constant Boolean := False; + Design_Unit, Last_Design_Unit : Iir_Design_Unit; Lib_Ident : constant Name_Id := Get_Identifier (Library); Design_File: Iir_Design_File; Library_Unit: Iir; Line, Col: Int32; + File_Id : Name_Id; File_Dir : Name_Id; Pos: Source_Ptr; Date: Date_Type; @@ -397,7 +400,7 @@ package body Libraries is -- Check the library was not already loaded. pragma Assert (Get_Design_File_Chain (Library) = Null_Iir); - if False then + if Trace_Library_Load then Ada.Text_IO.Put_Line ("Load library " & Image (Lib_Ident)); end if; @@ -413,8 +416,13 @@ package body Libraries is return False; end if; - File := Files_Map.Load_Source_File - (Dir, Get_Identifier (Library_To_File_Name (Library))); + File_Id := Get_Identifier (Library_To_File_Name (Library)); + if Trace_Library_Load then + Ada.Text_IO.Put_Line + (" from " & Image (Dir) & Image (File_Id)); + end if; + + File := Files_Map.Load_Source_File (Dir, File_Id); if File = No_Source_File_Entry then -- Not found. Set_Date (Library, Date_Valid'First); @@ -693,7 +701,6 @@ package body Libraries is else Work_Library := Create_Iir (Iir_Kind_Library_Declaration); Set_Location (Work_Library, Implicit_Location); - --Set_Visible_Flag (Work_Library, True); Set_Library_Directory (Work_Library, Work_Directory); Set_Identifier (Work_Library, Work_Library_Name); |