How do I debug an Offload™ block?
Offload KB - faq
Old Content Alert
Please note that this is a old document archive and the will most likely be out-dated or superseded by various other products and is purely here for historical purposes.
Offload™ blocks go through extensive modifcation to allow for ease of migration, but this has the trade off that generated code can be quite hard to track and follow.
You can debug Offload blocks like any other SPU job/thread/task. The offloadPause() function within <liboffload> may be used to cause a trap instruction on PPU or SPU to aid debugging. The call-stack should be fully visible, although function names may have additional suffixes to indicate __inner or __outer function pointer parameters, or indicate the memory location of the this pointer of method functions.
You can step through Offload generated SPU code like normal, and appearing will be the PPU source it was generated from. Type information is however lost - it is generally compared to debugging optimized code.