Following up to my earlier message:
Is it possible we're not actually getting to static
EXCEPTION_DISPOSITION ghdl_SEH_handler(...) at all?
That was my first guess, but it'll probably be a few
days before I have time to dig into this further.
As a quick sanity check, I checked the patched ghdl-mcode against an
integer divide-by-zero, instead of an index range out-of-bounds.
The divide-by-zero was caught by the exception handler as follows, with
the test printf showing up along with the expected messages:
C:\brian\jobs\ghdl_test\divide_by_zero>ghdl -r div_test
in ghdl_SEH_handler
exception raised: division by 0
c:\ghdl\ghdl-0.31-patched\bin\ghdl.exe:error: simulation failed
So the integer divide exceptions are being caught, which means the
ghdl_SEH_handler is being registered.
But it would seem that the range check integer overflow exceptions are
never making it to the ghdl_SEH_handler.
I have no idea how the GNAT/windows exception handling mechanisms work,
so I'll have to do some research before I can offer any sort of
sensible opinion on why that is.
-Brian
entity div_test is
end div_test;
architecture behaviour of div_test is
begin
process
variable i,j,k : integer;
begin
i := 10;
j := 0;
k := i / j;
wait;
end process;
end behaviour;
_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss