On Fri, 2013-02-01 at 17:12 +0100, David Costa wrote:
> If a non VHDL file is given as argument GHDL simply points it out.
> If a directory is given (even if it is nonsense it could happen by
> mistake), it crashes with a message that doesn't explain what happens
> at
> all.
See if the following is an improvement...
(testing here is still in progress, but looks simple enough)
- Brian
--- 0.30/ghdl-0.30/vhdl/files_map.adb 2012-09-28 12:12:35.000000000 +0100
+++ gcc-4.7.2/gcc/vhdl/files_map.adb 2013-02-01 19:56:11.112987893 +0000
@@ -757,6 +757,9 @@
declare
Filename : String := Get_Pathname (Directory, Name, True);
begin
+ if not Is_Regular_File(Filename) then
+ return No_Source_File_Entry;
+ end if;
Fd := Open_Read (Filename'Address, Binary);
if Fd = Invalid_FD then
return No_Source_File_Entry;
_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss