Skip to content

Instantly share code, notes, and snippets.

@jeanthom
Last active February 27, 2021 01:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeanthom/f331c3ba86b2758c3fb1fe297f256bec to your computer and use it in GitHub Desktop.
Save jeanthom/f331c3ba86b2758c3fb1fe297f256bec to your computer and use it in GitHub Desktop.
GHDL recipe: debugging assertion warnings

GHDL recipe: debugging assertion warnings

This method doesn't work with ghdl-mcode.

  1. Build your simulation with debug infos (ie. add -g flag to the ghdl build)
  2. Open the generated executable in a debugger
  3. Add a breakpoint on the __ghdl_fatal function (in gdb b __ghdl_fatal)
  4. Run the program with --assert-level=warning as its argument (in gdb run --assert-level=warning)
  5. Use the debugger backtrace functionality (in gdb bt) to resolve the origin of the issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment