On Thu, Oct 15, 2009 at 09:53:23PM -0700, Peter LaDow wrote: > On Thu, Oct 15, 2009 at 7:17 PM, Tristan Gingold <[email protected]> wrote: > > The crash happens in one process, during elaboration. > > You can use --trace-processes option at run to see which processes are > > running. > > Indeed, it is a process that calls a foreign subprogram. I get: > > run process .tb(behav).P0 [0833A428] > ../tb:error: invalid memory access (dangling accesses or stack size too small) > ../tb:error: simulation failed > > Here's the gist: > > architecture behav of tb is > function init return natural is > begin > assert false severity failure; > return 0; > end function init; > attribute foreign of init : function is "VHPIDIRECT init"; > > begin > process > variable status : natural; > begin > status = init; > > .... > > assert false report "Simulated halted." severity failure; > end process; > end architecture behav; > > Obviously I have more than this, but this is pretty much what is > happening right off. So I run the testbench in gdb, and set a > breakpoint in my foreign subprogram "init". It never gets there.
Compile this file with -g, and try to set a breakpoint at the line 'status := init'. Can you create a reproducer ? If so, send it to me (or send your design if you can) and I will investigate. > So I'm thinking that perhaps a shared library is failing to load (I am > linking against the pthread library)? I can see the source code of > the "init" function, and can set breakpoints. But since it never gets > there.... I think that if a shared library is failing to load, you will have an error. Tristan. _______________________________________________ Ghdl-discuss mailing list [email protected] https://mail.gna.org/listinfo/ghdl-discuss
