Skip to content

YAKL Debugging Tips

Matt Norman edited this page May 25, 2022 · 1 revision

YAKL has a fairly robust internal debugging system that is enabled with the CPP macro -DYAKL_DEBUG being defined. Things that can reliably be detected at compile time are on by default with static_assert. YAKL_DEBUG performs array bounds checks as well as checks to ensure arrays are allocated before indexing and are allocated before calling most of the intrinsics functions.

Runtime failures on the host always throw an C++ exception, which you can trace with gdb or the debugging tool of your choice. Sometimes, core files are dumped from exception throwing, which you can also trace with gdb or your favorite debugging tool.

When using valgrind, which I strongly recommend you become familiar with if you aren't already, please be sure to set the shell environment variable export GATOR_DISABLE=1. This is because the pool will hide indexing errors and use of uninitialized memory locations.

Clone this wiki locally