https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64206
--- Comment #10 from David Malcolm <dmalcolm at gcc dot gnu.org> --- (In reply to drepper.fsp+r...@gmail.com from comment #9) > Created attachment 35307 [details] > Little hello world > > Probably copied from the documentation, nothing special. You need to set GCC_JIT_BOOL_OPTION_DEBUGINFO on the context for the generated code to be debuggable: https://gcc.gnu.org/onlinedocs/jit/topics/contexts.html#GCC_JIT_BOOL_OPTION_DEBUGINFO You need something ctxt.set_bool_option (GCC_JIT_BOOL_OPTION_DEBUGINFO, 1); This leads to: (1) adding -g to the command-line options of the notional compile, so that fake.so includes DWARF data (2) delaying cleanup of fake.so until after the gcc_jit_result is released