Tutorial: Debugging with Intel® Distribution for GDB*
Error message: Another version of this product is already installed.
You see this error when Intel® Distribution for GDB* Target from previous Beta releases or Intel® Debugger for Heterogeneous Compute Target included in Intel® System Studio are installed on your system.
To remove incompatible programs, use Add/Remove Programs on the Control Panel.
Error message: target is not available. gdbserver cannot be run automatically.
On the target system, check that gdbserver-gt can be start successfully from the command prompt:
gdbserver-gt.exe --attach 127.0.0.1:1234 1
where:
If gdbserver-gt starts successfully, restart the application in Microsoft Visual Studio*. To debug the code offloaded to GPU device, you must start the gdbserver manually each time before launching the application.
If gdbserver-gt fails to start, the following error message appears:
failed to initialize GT; result: Failure Exiting
sc query igfxdcd
sc start igfxdcd
The output must look as follows:
SERVICE_NAME: igfxdcd TYPE : 1 KERNEL_DRIVER STATE : 4 RUNNING (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN) WIN32_EXIT_CODE : 0 (0x0) SERVICE_EXIT_CODE : 0 (0x0) CHECKPOINT : 0x0 WAIT_HINT : 0x0 PID : 0 FLAGS :
Restart the debugger from Microsoft Visual Studio. If the problem persists, go to step 1.
No error messages are displayed but a breakpoint inside the kernel is not hit.
Check the following settings:
In Tools > Options > Intel oneAPI > Intel® Distribution for GDB*, the Enable Debugging field is set to True.
On the target system, PATH variable includes the path to the target installation folder.
Start gdbserver-gt via SSH connection with SSL tunnel from the host to the target.
ssh remote-server -L 1234:127.0.0.1:1234
gdbserver-gt.exe --attach 127.0.0.1:1234 1
Go to Tools > Options > Intel oneAPI > Intel® Distribution for GDB* and set the Server field to localhost
This ensures that you have a secure connection. Additionally, starting the gdbserver-gt under SSH allows you to stop the server during the debugging session when the graphics output is frozen.
You get an unhandled exception coming from IGC at the runtime when the Debug information format is set. To resolve this issue, set Property pages > Linker > Pass additional options to device compilers to /Od.