Debugging JIT compiled code line by line

I am trying to debug some JIT compiled code that is used by my Optix 7 _raygen__rg() method but the stack trace is not yielding any information finer than the name of the called method. For example:

CUDA Exception: Warp Misaligned Address
The exception was triggered at PC 0x17bf99d0

Thread 1 “blort” received signal CUDA_EXCEPTION_6, Warp Misaligned Address.
[Switching focus to CUDA kernel 0, grid 48, block (135,0,0), thread (32,0,0), device 0, sm 0, warp 4, lane 0]
0x0000000017bf99e0 in ProcessResult ()
(cuda-gdb) l
1 OPTIX/generated/internal: No such file or directory.

I provided these options to optixModuleCreateFromPTX():

  OptixModuleCompileOptions module_compile_options = {};
  module_compile_options.maxRegisterCount     = OPTIX_COMPILE_DEFAULT_MAX_REGISTER_COUNT;
  module_compile_options.optLevel             = OPTIX_COMPILE_OPTIMIZATION_LEVEL_0;
  module_compile_options.debugLevel           = OPTIX_COMPILE_DEBUG_LEVEL_FULL;

Yet cuda-gdb seems either unaware of the ptx source or unable to find it. Any ideas? Thanks.

Full symbolic debugging of OptiX programs in cuda-gdb isn’t supported yet, we are working on that. SASS level debugging works, but you have to figure out the correspondence to your source code manually. That can be pretty difficult, I don’t expect that to be a helpful suggestion or viable workaround unless you are extremely comfortable with assembly debugging. Breakpoints sometimes work, so you may be able to use them to help narrow down the region causing your misaligned address exception.

Here are a couple of threads with some suggestions for other possible ways to debug:

(see the print_pixel macro)