Get Started with Intel® Distribution for GDB* on Windows* OS Host

ID 766465
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Get Started with Intel® Distribution for GDB* on Windows* OS Host

Start using the Intel® Distribution for GDB* for debugging applications. Follow the instructions below to set up the debugger to debug applications with kernels offloaded to CPU devices.

Intel® Distribution for GDB* is available as part of the Intel® oneAPI Base Toolkit. For more information on oneAPI toolkits, visit the product page.

Visit the Release Notes page for information about key capabilities, new features, and known issues.

You can use a SYCL* sample code, Array Transform, to get started with the Intel® Distribution for GDB*. The sample does not generate errors and simply illustrates debugger features. The code processes elements of the input array depending on whether they are even or odd and produces an output array. You can use the sample to debug on a CPU.

Prerequisites

Get Started with CPU Debugging

Build the Application

  1. In Microsoft Visual Studio*, go to File > New > Browse Intel oneAPI Samples and select Debugger: Array Transform.

    If you have already fetched the sample or you have your own sample, simply open the solution file with Microsoft Visual Studio*.

  2. In the Solution Explorer, right-click the array-transform project and select Properties. Alternatively, press Alt+Enter.

    1. Under Configuration Properties, select General and set  Platform Toolset to Intel® oneAPI DPC++ Compiler.

    2. Under Configuration Properties, select Debugging. Set Command Arguments to cpu.

    3. Select Linker and set the Pass additional options to device compilers field to /Od. This setting disables kernel optimizations to provide a smooth debug experience.

    4. Click Apply to save the changes.

  3. To build the solution, select Build > Build Solution in the main Visual Studio toolbar. In the Output window, verify that the build is successful.

Debug the Application

You are ready to debug your project.

  1. Open Tools > Options > Debugging.

    Uncheck the option “Require source files to exactly match the original version”.

  2. Set breakpoint at line 83 in the array-transform.cpp file.

  3. From the Debug menu, select Start Debugging.

  4. Click the Local Windows Debugger menu.

You will see when the thread hits the breakpoint.

Learn More

Document

Description

Tutorial: Debugging with Intel® Distribution for GDB*

This document describes the basic scenarios to follow while debugging SYCL* and OpenCL with Intel® Distribution for GDB*.

Intel® Distribution for GDB* User Guide

This document describes all common tasks that you can complete with Intel® Distribution for GDB* and provides necessary technical details.

Intel® Distribution for GDB* Release Notes

The notes contain information about key capabilities, new features, and known issues of Intel® Distribution for GDB*.

oneAPI Product Page

This page contains brief introduction on oneAPI toolkits and links to useful resources.

Jacobi Sample

This small SYCL* application has two versions: bugged and fixed. Use the sample to exercise application debugging with Intel® Distribution for GDB*.

Notices and Disclaimers

Intel technologies may require enabled hardware, software or service activation.

No product or component can be absolutely secure.

Your costs and results may vary.

© Intel Corporation. Intel, the Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries. Other names and brands may be claimed as the property of others.

No license (express or implied, by estoppel or otherwise) to any intellectual property rights is granted by this document.

The products described may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request.

Intel disclaims all express and implied warranties, including without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement, as well as any warranty arising from course of performance, course of dealing, or usage in trade.

OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos.