Debugging an emulated OpenCL FPGA kernel
Hi,
We are using Intel FPGA OpenCL SDK 21.1.
We cannot successfully set a breakpoint in the kernel when using the emulator and GDB. The breakpoint we set is never hit.
We installed GCC 7.2 as was specified in the instructions and we managed to build/run the emulated kernel.
We used the following instructions to setup a breakpoint:
“To run your kernel in the debugger:
During program execution, the debugger cannot step from the host code to the kernel code. You must set a breakpoint before the actual kernel invocation by adding these lines:
break <your_kernel>
This line sets a breakpoint before the kernel.
continue
If you have not begun debugging your host, then type start instead.
The debugger does not recognize kernel names until the host actually loads the kernel functions. As a result, the debugger generates the following warning for the breakpoint you set before the execution of the first kernel:
Function "<your_kernel>" not defined.
Make breakpoint pending on future shared library load? (y or [n])
Answer y. After initial program execution, the debugger recognizes the function and variable names, and line number references for the duration of the session.”
This problem can be reproduced on the vector add example provided with the SDK. We are using Centos 7.9.
Is there a known problem with debugging emulated kernels on OpenCL SDK 21.1? Do we need to use a specific GDB version? Any other ideas what could be the problem?
Thx