Get Started with Intel® Distribution for GDB* on
Windows* OS Host
Get Started with Debugging on a CPU
- In Microsoft Visual Studio* 2017 or 2019, go toFile > New > Browse Intel oneAPI Samplesand selectArray Transform.If you have already fetched the sample or you have your own sample, simply open the solution file with Microsoft Visual Studio.
- Go toTools > Options > Debugging > Generaland uncheck theRequire source files to exactly match the original versionbox.
- Go toProject > Properties
- SelectGeneraland setPlatform ToolsettoIntel® oneAPI DPC++ Compiler.
- SetCommand Argumentstocpu
- Set theEnvironmentfiled toCL_CONFIG_USE_NATIVE_DEBUGGER=1
- To disable kernel optimizations for a smooth debug experience, selectLinkerand set thePass additional options to device compilersfield to/Od.
- To build the solution, selectBuild > Build Solution. In theOutputwindow, verify that the build is successful.
- From theDebugmenu, selectStart Debugging.
- Click theLocal Windows Debuggermenu.
Get Started with Debugging on a GPU
- Make sure that run-time dependencies on shared libraries from Intel® oneAPI Toolkits are available on the target system. You can choose one of the following ways:
- Install run-time dependencies on the target system (recommended). Select Intel® oneAPI DPC++/C++ Compiler Runtime for Windows* from the list of run-time dependencies.
- Install Intel® oneAPI Toolkit on the target system.
- Copy run-time dependencies from the host to the target.
- Add the run-time dependencies to the PATH variable on the target system. Skip this step if you opted for installing run-time dependencies package in step 1.If you use the sample program, Array Transform, add the following compiler paths to thePATHvariable:
- Path toIntel\oneapi\compiler\latest\windows\bin
- Path toIntel\oneapi\compiler\latest\windows\redist\intel64_win\compiler.
- You do not need to add these settings to theEnvironmentfield in theProperty Pages > Debuggingtab in Microsoft Visual Studio. Otherwise, this value substitutes the originalPATHvariable on the remote system.
- Additional Files to Deployfeature of Microsoft Visual Studio does not support deploying entire directories, so it is inconvenient to use this option for deploying oneAPI libraries.
- Copy the installer of Microsoft Visual Studio remote debugger(gen_debugger_target.msi)from the host system to the target one.The installer is located at<. The default install path isinstall_dir>\targetC:\Program Files (x86)\Intel\oneapi\debugger\latest. You can use %ONEAPI_ROOT% variable, specifying the debugger latest version: %ONEAPI_ROOT%\debugger\latest.
- Run the installer on the target. After the installation, reboot the system.The installer sets the following registry keys to 0:
These settings disable Timeout Detection and Recovery (TDR) and preemption requests from the GPU scheduler.
This document describes the basic scenarios to follow while debugging DPC++ and OpenCL with Intel® Distribution for GDB*.
This document describes all common tasks that you can complete with Intel® Distribution for GDB* and provides necessary technical details..
The notes contain the most up-to-date information about Intel® Distribution for GDB* as part of the Intel® oneAPI Base Toolkit.
This page contains brief introduction on oneAPI toolkits and links to useful resources.