diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-09-20 06:34:17 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-09-25 18:32:44 +0200 |
commit | 9b4b6d4bdf555ec3fcd1facfa788f2e6284451f8 (patch) | |
tree | d57dcf1d9ff8cdcc07b01130f21f40a9ce3ac5f4 /src | |
parent | aad7309ed4eb0f0bc71b39135c188cc674e389ee (diff) | |
download | ghdl-9b4b6d4bdf555ec3fcd1facfa788f2e6284451f8.tar.gz ghdl-9b4b6d4bdf555ec3fcd1facfa788f2e6284451f8.tar.bz2 ghdl-9b4b6d4bdf555ec3fcd1facfa788f2e6284451f8.zip |
files_map: add debug_source_loc.
Diffstat (limited to 'src')
-rw-r--r-- | src/files_map.adb | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/files_map.adb b/src/files_map.adb index 2b6fc7e56..3a8fa071c 100644 --- a/src/files_map.adb +++ b/src/files_map.adb @@ -1088,11 +1088,16 @@ package body Files_Map is end Extract_Expanded_Line; -- Debug procedures. - procedure Debug_Source_Lines (File: Source_File_Entry); - pragma Unreferenced (Debug_Source_Lines); - - procedure Debug_Source_File; - pragma Unreferenced (Debug_Source_File); + procedure Debug_Source_Loc (Loc : Location_Type) + is + File : Source_File_Entry; + Line_Pos : Source_Ptr; + Line : Natural; + Offset : Natural; + begin + Location_To_Coord (Loc, File, Line_Pos, Line, Offset); + Put_Line (Extract_Expanded_Line (File, Line_Pos)); + end Debug_Source_Loc; -- Disp sources lines of a file. procedure Debug_Source_Lines (File: Source_File_Entry) is @@ -1132,6 +1137,10 @@ package body Files_Map is end loop; end Debug_Source_File; + pragma Unreferenced (Debug_Source_Lines); + pragma Unreferenced (Debug_Source_File); + pragma Unreferenced (Debug_Source_Loc); + procedure Initialize is begin for I in Source_Files.First .. Source_Files.Last loop |