Previous: Simulation options, Up: Simulation and runtime
Debugging VHDL programs using GDB is possible only on GNU/Linux systems.
GDB is a general purpose debugger for programs compiled by GCC.
Currently, there is no VHDL support for GDB. It may be difficult
to inspect variables or signals in GDB, however, GDB is
still able to display the stack frame in case of error or to set a breakpoint
at a specified line.
GDB can be useful to precisely catch a runtime error, such as indexing
an array beyond its bounds. All error check subprograms call the
__ghdl_fatal procedure. Therefore, to catch runtime error, set
a breakpoint like this:
(gdb) break __ghdl_fatal
When the breakpoint is hit, use the where or bt command to
display the stack frames.