diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-02-12 21:07:08 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-02-12 21:07:49 +0100 |
commit | 91134d4f5a1220521cb9720a1feeb5d09c512bb9 (patch) | |
tree | ba6f585650fcafa6443cb8ca5ce8e63f4746ecc2 /src/files_map.adb | |
parent | 89c817660b426ef9603a264a2aaf6407d0da40e1 (diff) | |
download | ghdl-91134d4f5a1220521cb9720a1feeb5d09c512bb9.tar.gz ghdl-91134d4f5a1220521cb9720a1feeb5d09c512bb9.tar.bz2 ghdl-91134d4f5a1220521cb9720a1feeb5d09c512bb9.zip |
files_map: fix crash in Debug_Source_File
Diffstat (limited to 'src/files_map.adb')
-rw-r--r-- | src/files_map.adb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/files_map.adb b/src/files_map.adb index a1844cbb2..e78741de9 100644 --- a/src/files_map.adb +++ b/src/files_map.adb @@ -1006,7 +1006,7 @@ package body Files_Map is declare F : Source_File_Record renames Source_Files.Table(I); begin - Put ("file" & Source_File_Entry'Image (I)); + Put (Source_File_Entry'Image (I)); Put (" name: " & Image (F.File_Name)); Put (" dir:" & Image (F.Directory)); Put (" length:" & Natural'Image (F.File_Length)); @@ -1014,9 +1014,15 @@ package body Files_Map is if F.Checksum /= No_File_Checksum_Id then Put (" checksum: " & Get_File_Checksum_String (F.Checksum)); end if; - Put (" nbr lines:" & Natural'Image (F.Nbr_Lines)); - Put (" lines_table_max:" & Natural'Image (F.Lines_Table_Max)); - New_Line; + case F.Kind is + when Source_File_File => + Put (" nbr lines:" & Natural'Image (F.Nbr_Lines)); + Put (" lines_table_max:" + & Natural'Image (F.Lines_Table_Max)); + New_Line; + when others => + null; + end case; end; end loop; end Debug_Source_File; |