3.2.1.4 Debugging

C++ Function: void gccjit::context::dump_to_file (const std::string &path, int update_locations)

To help with debugging: dump a C-like representation to the given path, describing what’s been set up on the context.

If “update_locations” is true, then also set up gccjit;;location information throughout the context, pointing at the dump file as if it were a source file. This may be of use in conjunction with GCCJIT::BOOL_OPTION_DEBUGINFO to allow stepping through the code in a debugger.

C++ Function: void gccjit::context::dump_reproducer_to_file (gcc_jit_context *ctxt, const char *path)

This is a thin wrapper around the C API gcc_jit_context_dump_reproducer_to_file(), and hence works the same way.

Note that the generated source is C code, not C++; this might be of use for seeing what the C++ bindings are doing at the C level.