Forum Discussion
Altera_Forum
Honored Contributor
8 years agoI normally use gdb which i found to be pretty helpful. If you run it on your host application, you'll need to ignore interrupts otherwise it will treat them as breakpoints for SIG44 and SIG64 (https://www.altera.com/en_us/pdfs/literature/hb/opencl-sdk/aocl_programming_guide.pdf#_opentopic_toc_processing_d116e18533) or just continue whenever you hit a break from the interrupt signal. Then you can use a backtrace (bt) when the debugger hits the seg fault and it can tell you what line it is occurring on.
Also you'll need to add the -g flag to gcc to enable debug info to get more meaningful information from gdb.