Totalview® for HPC User Guide : PART V Using the CUDA Debugger : Chapter 28 CUDA Debugging Tutorial : Displaying CUDA Program Elements : GPU Variable and Data Display
GPU Variable and Data Display
TotalView can display variables and data from a CUDA thread. The stack frame pane of the process window contains parameter, register, local, and shared variables, as shown in Figure 271. The variables are contained within the lexical blocks in which they are defined. The type of the variable determines its storage kind (register, or local, shared, constant or global memory). The address is a PTX register name or an offset within the storage kind.
 
Figure 271 – A variable window displaying a parameter
Dive on a variable in the stack frame pane or source pane in the process window to open a variable window. Figure 271 shows a parameter named A with type @parameter const Matrix.
The identifier @parameter is a TotalView built-in type storage qualifier that tells the debugger the storage kind of "A" is parameter storage. The debugger uses the storage qualifier to determine how to locate A in device memory. The supported type storage qualifiers are shown in Table 3.
 
Table 3: Supported Type Storage Qualifiers
Storage Qualifier
Meaning
@code
An offset within executable code storage
@constant
An offset within constant storage
@generic
An offset within generic storage
@frame
An offset within frame storage
@global
An offset within global storage
@local
An offset within local storage
@parameter
An offset within parameter storage
@iparam
Input parameter
@oparam
Output parameter
@shared
An offset within shared storage
@surface
An offset within surface storage
@texsampler
An offset within texture sampler storage
@texture
An offset within texture storage
@rtvar
Built-in runtime variables (see CUDA Built-In Runtime Variables)
@register
A PTX register name (see PTX Registers)
@sregister
A PTX special register name (see PTX Registers)
The type storage qualifier is a necessary part of the type for correct addressing in the debugger. When you edit a type or a type cast, make sure that you specify the correct type storage qualifier for the address offset.