The GNU* Project Debugger (GDB) provided with the Intel® Parallel Studio XE Composer Edition is based on GDB with enhancements provided by Intel.

It can debug applications:

IA-32/Intel® 64 Architecture debugging

Debug applications natively on IA-32 or Intel® 64 Architecture systems.

Prerequisites

Always source the following script in the same environment where you use the debugger:

source <install-dir>/bin/compilervars.sh

<install-dir> is the installation directory, by default, it is:

  • For root users: /opt/intel/<suitename>
  • For non-root users: $HOME/intel/<suitename>

For other prerequisites, new debugger features, hardware and software requirements, and known issues refer to the release notes.

Start GDB for Native IA-32/Intel® 64

To debug applications natively on IA-32 or Intel® 64 Architecture systems, start GDB with the following command:

gdb-ia

The actual debugger usage is the same as for the GNU* Project Debugger. Extensions for IA-32/Intel® 64Architecture are described in the debugger documentation.

Intel® Xeon Phi™ coprocessor debugging (Linux* OS only)

Debug applications remotely on Intel® Xeon Phi™ coprocessor systems.

The debugger runs on a host system and a debug agent (gdbserver) runs on the coprocessor. There are two options:

Prerequisites

Always source the following script in the same environment where you use the debugger:

source <install-dir>/bin/compilervars.sh

<install_dir> is the installation directory, by default, it is:

  • For root users: /opt/intel/<suitename>
  • For non-root users: $HOME/intel/<suitename>

For other prerequisites, new debugger features, hardware and software requirements, and known issues refer to the release notes.

Start GDB for Intel® Xeon Phi™ Coprocessor Applications (Linux* OS Only)

Debugging applications for the Intel® Xeon Phi™ coprocessor is like debugging a remote Intel® 64 application:

The host is running the debugger GNU* GDB. This system can be the host containing the coprocessor cards or any other development host.

The target, here the coprocessor itself, executes a debug agent (gdbserver) to which the host connects to.

For more information on debugging on the Intel® Xeon Phi™ coprocessor, see also http://software.intel.com/en-us/articles/debugging-intel-xeon-phi-applications-on-linux-host.

You can either start the debugger from the command line or from Eclipse* IDE.

Starting the debugger from the command line:

  1. Transfer the debug agent to the Intel® Xeon Phi™ coprocessor, such as:

    $ scp <install_dir>/debugger_<product_version>/gdb/targets/intel64/x200/bin/gdbserver "mic0:/tmp"

    <install_dir> is the installation directory, by default, it is:

    • For root users: /opt/intel/<suitename>
    • For non-root users: $HOME/intel/<suitename>
  2. Start GDB on the host and connect to the target, such as:

    $ gdb-ia
    (gdb) target extended-remote | ssh mic0 /tmp/gdbserver --multi –

    • To load and execute an application on the coprocessor, issue the following commands:

      (gdb) file <path_on_host>/<application>
      (gdb) set remote exec-file <path_on_target>/<application>

    • To attach to a process already running on the coprocessor with PID <pid>, issue the following commands:

      (gdb) <file> <path_on_host>/<application> 
      (gdb) attach <pid>

Starting the debugger from Eclipse* IDE:

  1. Set the following additional environment variables on your host system for Intel® Manycore Platform Software Stack (Intel® MPSS) 4.4 or higher:

    AMPLXE_COI_DEBUG_SUPPORT=TRUE
    MYO_WATCHDOG_MONITOR=-1

  2. Start Eclipse* IDE.
  3. Click Help > Install New Software...
  4. Click the Add... button.
  5. Click the Local... button and select the directory <install-dir>/ide_support_<version>/eclipse/gdb_xe.
  6. Uncheck Group items by category (checked by default).
  7. Check the plug-in Debugger Integration for Intel® 64 and Intel® MIC Architectures.
  8. Complete the installation of the plug-in.
  9. Restart Eclipse* IDE.
  10. Select Run > Debug Configurations and create a new debug configuration by double-clicking C/C++ MIC Offload Application on the left side bar of the dialog box.

Configuring Eclipse* for Debugging Fortran Applications with GDB:

  1. Start Eclipse* IDE.
  2. Click Help > Install New Software
  3. Expand the Work with: dropdown menu and select the appropriate Eclipse* version.
  4. Expand Programming Languages and check the checkboxes for
    • Fortran Development Tools (Photran)
    • Linux Intel(R) Fortran Compiler Support
  5. Complete the installation of these two plugins.
  6. For every Fortran project
    • Click Run > Debug Configurations...
    • Select C/C++ Application and click New_configuration.
    • Enter the configuration for the respective Fortran project.
    • Go to the Debugger tab.
    • Check the checkbox Stop on startup at: and enter main__.
    • Close the Debug Configurations dialog box.

Documentation and Resources

Document Description
GDB Manual Contains descriptions of the GNU* Debugger (GDB) functions and interfaces including Intel-extended features for debugging applications natively on IA-32 or Intel® 64 Architecture systems.
GDB Manual in Info format

To read the GDB Manual in the Info format, use the following command:

info gdb-ia

GDB man pages

To access the GDB man pages, set the environment variables by sourcing the compiler environment script, compilervars.sh, and use the following command:

man gdb-ia

Intel® Parallel Studio XE 2018 Composer Edition Fortran - Debug Solutions Release Notes

Intel® Parallel Studio XE 2018 Composer Edition C++ - Debug Solutions Release Notes

Release Notes for debugging with Intel® Parallel Studio XE.
Intel® Parallel Studio XE Intel® Parallel Studio XE product page. See this page for support and online documentation.

Legal Information

No license (express or implied, by estoppel or otherwise) to any intellectual property rights is granted by this document. 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. This document contains information on products, services and/or processes in development. All information provided here is subject to change without notice. Contact your Intel representative to obtain the latest forecast, schedule, specifications and roadmaps. The products and services described may contain defects or errors known as errata which may cause deviations from published specifications. Current characterized errata are available on request.

Intel, the Intel logo, Xeon, and Intel Xeon Phi are trademarks of Intel Corporation in the U.S. and/or other countries.

*Other names and brands may be claimed as the property of others.

© 2017, Intel Corporation