Technical data
Debugging Cray Standard C/C++ Code [8]
The Cray TotalView symbolic debugger is available to help you debug C and C++
codes. In addition, the Cray Standard C/C++ compilers provide the following
features to help you in debugging codes:
• The -G and -g compiler options provide symbol information about your
source code for use by the Cray TotalView debugger. For more information on
these compiler options, see Section 2.17.1, page 29.
• The -h [no]trunc option helps identify numerically unstable algorithms.
For more information, see Section 2.15.7, page 28.
• The -h [no]bounds option and the #pragma _CRI [no]bounds directive
let you check pointer and array references. The -h [no]bounds option
is described in Section 2.17.2, page 30. The #pragma _CRI [no]bounds
directive is described in Section 3.5.2, page 49.
• The #pragma _CRI message directive lets you add warning messages to
sections of code where you suspect problems. The #pragma _CRI message
directive is described in Section 3.5.4, page 52.
• The #pragma _CRI [no]opt directive lets you selectively isolate portions
of your code to optimize, or to toggle optimization on and off in selected
portions of your code. The #pragma _CRI [no]opt directive is described
in Section 3.5.5, page 53.
8.1 Cray TotalView Debugger
The Cray TotalView debugger is designed for use with Cray Standard C, C++,
or Fortran source code. The TotalView debugger is documented in Introducing
the Cray TotalView Debugger.
Some of the functions available in the Cray TotalView debugger allow you to
perform the following actions:
• Set and clear breakpoints, which can be conditional, at both the source code
level and the assembly code level
• Examine core files
• Step through a program, including across function calls
• Reattach to the executable file after editing and recompiling
S–2179–36 121










