Intel(R) Debugger for Linux* (IDB)

Submit New Article

Last Modified On :   February 26, 2009 4:54 PM PST
Rate
 


Introduction
This article provides an overview of the Intel® Debugger for Linux* as included with the Intel® C++ Compiler for Linux* 11.x Professional distribution. A more detailed whitepaper is attached in PDF format. The increased complexity of modern applications along with the advent of multi-core processor technology and concurrent multi-threaded program execution models makes thread specific runtime control and direct accessibility of threading properties inside of a debug solution ever more important. The Intel® Debugger for Linux* is a fully Eclipse* graphical user interface based debug solution with advanced features intended to achieve exactly that. In this whitepaper we  will cover the capabilities of the Intel® Debugger for Linux* that address ways to enable faster coding issue identification and resolution. Please also have a close look at the more expansive whitepaper attached in PDF format.


 
Requirements
Hardware Platform: IA-32, Intel®64 architecture or compatible.
Software Platform: Linux* OS based environment
Java runtime environment (JRE 1.5 or JRE 1.6) to use the Eclipse* framework

The compatibility libstdc++ package for the standard GCC 3.4 C++ libraries. For Ubuntu Linux* the libstdc++5 package in version 3.3.6-15 can be downloaded directly through the apt-get installer. On the original Fedora Core* 6 i686 installation media it is named compat-libstdc++-33-3.2.3-61.i386.rpm.

The Intel® Debugger works with the following compilers:

Intel® C++ Compilers and Intel® Fortran Compilers
gcc, g++, and g77 compilers


See the Intel® Debugger Manual  for additional information. Please also see the release notes for platform specific restrictions and known limitations of this release.

Motivation
The advent of more and more "multi"- and "many" core processors requires extensive use of parallel programming models to best take advantage of the benefits these systems provide to program execution flow and thus to get the best performance out of these systems. Using more and more advanced parallel programming techniques makes it however more and more difficult to keep track of all active threads and their possible data inter-dependencies. The purpose of the Intel® Debugger and it's new Eclipse Rich-Client Platform based graphical user interface together with the thread grouping and thread awareness capabilities is to pair the tools Intel provides for developing highly multi-threaded parallel applications with the debugger to allow for equally advanced and easily accessible features for coding issue resolution. Advanced parallel programming techniques call for advanced parallel debugging techniques to keep the executions flow and the analysis of runtime problems straight forward and allow for speedy error corrections.

Intel's compilers generate high quality symbol information even when advanced optimization techniques are being used and thus enable effective debugging on the wide variety of platforms they support. Intel compilers work with native debuggers, the Intel® Debugger, and selected third-party debuggers. Conversely the Intel® Debugger and it's advanced GUI and threading awareness can be used  with application code generated by a variety of compilers. The added value provided by the Intel® Debugger includes enhanced visibility and more in depth understanding of

  • the data shared between multiple threads in Intel® C++ Compiler built applications
  • thread runtime behavior and thread interaction
  • the vectorized data streams processed in Single Instruction Multiple Data (SIMD) registers,
  • active OpenMP tasks lock information and thread team hierarchies.
  • Excellent Intel® hardware support (especially for early adopters)
  • Robust performance on Intel processor-based platforms (built and thoroughly tested using Intel compilers)
  • Superior language-feature support, including C++ templates, user-defined operators, and modern Fortran dialects (with Fortran module support)
  • Progressive support for the Intel compiler-specific features such as optimized code debugging and OpenMP*
  • Special features, such as support for huge applications, regular-expression search of the symbol table, breakpoints that track shared libraries as they are dynamically remapped throughout an address space, and support for applications, that are distributed via MPI-1
  • Support for native compilers as well as Intel® compilers. This support gives customers a high degree of flexibility for mixing and matching development
  • Tools to meet the unique demands of their specific development environments 

Overview
The Intel® Debugger for Linux* is a component of the Intel® C++ Compiler Professional Edition for Linux* and Intel® Fortran Compiler Professional Edition for Linux* product. It is a full-featured symbolic source-code application debugger that helps programmers locate run-time programming errors (i.e., incorrect code, memory leaks, stack overflows, unexpected exceptions or other algorithmic problems) in their code. The Intel® Debugger can debug both single and multi-threaded applications, serial and parallel code.  In it's latest version we added enhanced thread awareness and  thread-specific  breakpoint handling.  The application run-time control supports the concepts of lock-step stepping following a thread syncpoint, defining thread teams and even forced serialized execution of parts of your threaded application. Additionally we now provide OpenMP* windows with information about current tasks, teams,  task waits, barriers, task spawn trees and locks. Finally an SSE Windows was added that gives you access to SSE registers commonly used for data vectorization and single instruction multipe data (SIMD) handling. It displays vectors as rows (or columns) in a table display with ways to change the representation of the data in those registers that makes their use in the debuggee application as well as the actual data mapping to the underlying hardware more transparent.

In the latest update with the Intel(R) Debugger 11.1 two additional features supporting debugging of parallel code using OpenMP* have been added. Thread Data Sharing Event Detection allows the user to trigger on read/write accessess to data structures that are shared between multiple threads. You can stop on these events or just log them and point to the exact source location where they occur. This allows to identify possible data sharing violations as they occur during a debug session. Following a similar concept you can also stop execution on function re-entrancy. If one function is entered by two threads at the same time that usually means that additional precautions for thread safety need to be taken.

Graphical User Interface

IDBScreenshot.JPG

 

The Intel® Debugger by default is launched using the idb executable in the /opt/intel/Compiler/11.x/xxx/bin/intel64

or

/opt/intel/Compiler/11.x/xxx/bin/ia32

directory. Unless you use the iidb executable instead this will launch the full Eclipse* Rich Client Platform based GUI of the debugger.

The graphical user interface supports a rich user experience with intuitive access to all the standard debug features like stepping, breakpoints, callstack, source code switching, disassembly, variable views, and memory windows.

Thread-Awareness

The Intel® Debugger allows for increased thread run-time control during debug sessions with flexible thread execution models. It is possible to pick an individual focus thread for single stepping, halt and release inidvidual threads or pick a threas that should be under run-time control while the other threads are either halted or running freely.

This feature set is made even more useful by the ability to pick a group of threads either by selecting one of the debugger’s default groups or by defining a new thread group that you would like to apply breakpoints, single steps or other debugger control events to.

The thread-specific run-time control features extend to breakpoints as well. The full range of thread-grouping features can be used to select which applicaton threads code and data breakpoints shall be applied to.

To alter the parallel execution flow of all the threads in a given thread group something called syncpoints has been implemented in the Intel® Debugger. A Syncpoint allows to have all threads in a trigger group stop execution at one defined point. From this syncpoint the developer can then do syncronized locked stepping. This behavior of a syncpoint is very similar to how a thread barrier would act in regular parallel code execution flow. The difference is that the debugger allows you to temporarily simulate this execution flow behavior to better understand interactions between different threads and identify possible threading issues

To go one step further and essentially turn off parallel execution for a parallel section of the application code it is also possible to force serialized eyecution of a parallel application implemented with OpenMP*. This can be quite useful to clarify whether a runtime issue is caused by a serial algorithmic problem or has been introduced when OpenMP* directives were added. The code segment of the parallel region associated with the current program counter memory location will be put into serial single-threaded execution mode.


Last but not least the Intel® Debugger adds OpenMP* property windows. This feature displays and allows to monitor currently active OpenMP* threads, teams, barriers, locks, spawn trees and taskwaits in the debugged application, along with the exact curent execution state of all OpenMP* threads.

ParallelDialog2.JPG



Overview Listing of Debugger Features addressing Parallelism

Flexible Thread Execution Models
• Concept of “focus” thread set for next/step/finish
• Freezing and thawing of individual threads
• Can detach threads from debug control

Thread Grouping
• Smart default groupings by debugger (All, Team, Lockstep)
• Explicit grouping by user if required

Thread Group aware breakpoints
• Break when any member of the trigger group hit
• Can stop a specific thread set only

Thread Synchronizing Breakpoint “syncpoint”
• Stop when all threads in the trigger group reach it
• Similar to “barriers” in parallel programming

Dedicated OpenMP* Info Windows
• Threads, Teams, Tasks,Task spawn trees, Barriers, Taskwaits, Locks
• Serial execution of a parallel region at debug time

Thread Data Sharing Events
• Halt execution when two threads access the same data
• Log thread data sharing read/write events
• Exclude known harmless events from detection

Detect Function Re-Entrancy
• Halt execution when two threads access the same function




This article applies to: Tools,   Intel® C++ Compiler for Linux* Knowledge Base,   Intel® Fortran Compiler for Linux* Knowledge Base