A Tour of the Interface
Here we introduce the main views that make up the interface. If a view is not visible, restore it through the Preferences dialog, the Window | Views menu, or the context menu available by right-clicking in the toolbar area.
Central Area
When you first start up TotalView, the central area contains either just the Start Page, or the Start Page and a Source view if you started TotalView with an executable name argument. This area is reserved for displaying the Start Page, Source views and Assembler views of code, the Help view, and other debug status and data specific views associated with your debugging session.
Central area views cannot be re-docked into the side or bottom secondary view areas, but they can be re-docked within the central area to create their own optimal debugging layout, such as a side-by-side layout.
Figure 3, Source View and Start Page in the central area
 
The Source View
Viewing the Program Counter
*In normal debugging mode, the diamond cursor and yellow highlighting identify the Program Counter (PC), i.e. the code location of the debugger. Clicking another line result in a blue highlight, indicating the target line if you use the Run To command. (There is no guarantee that the thread of focus will arrive at that line, of course, if it hits a breakpoint first, or never executes the line.)
*In Replay mode, orange highlighting replaces yellow to identify where ReplayEngine is within the code. The red triangle shows the “Live” location, i.e., the last line executed. Once the PC hits the live location, it shifts from replay mode back to record mode.
Source view actions
*Create breakpoints by clicking on bold line numbers in the gutter.
*See variable information by hovering over a variable name.
*See function information by hovering over function names.
*Search for text strings with the Find function.
If you highlight the function name and select “Navigate to File or Function” from the context menu, TotalView finds and displays the source for the function, if the source is available. If there is more than one source location, displays the function name as a search in the Lookup view.
Unified Source View Display
The Source view provides a unified view of source-line breakpoints across all image files containing the source file, useful for programs in which the same source file or header file is compiled into multiple image files (e.g., executable and shared library files) used by the process.
Line numbers appear bold where TotalView has identified executable code, i.e., source code lines where the compiler has generated one or more line number symbols in the debug information.
For example, consider debugging a program that launches CUDA code running on a Graphics Processing Unit (GPU). When the host program is first loaded into TotalView, the CUDA threads have not yet launched, so the debugger has no symbol table information yet. Figure 4 shows the Source view before and after a CUDA kernel launch. Before the CUDA threads exist (the left pane), only line 134 has been identified as having executable code.
Figure 4, Unified Source view display
Once the program is running and the CUDA threads have started (the right pane), lines 126, 130, 132, 133, and 134 are bold, so now TotalView has been able to identify line number symbols at those locations.
 
RELATED TOPICS 
 
Using the Source view to set action points (breakpoints)
Source views and their relationship to data display
The Assembler View
You can view not only your source code but the assembly code generated by the compiler. The assembly version of your code reveals the machine instructions behind an operation so you can clearly see what your code is doing.
To view assembly code, choose either the menu item Window > Show Assembler (Ctrl+A), or right-click anywhere in the Source view and select Show Assembler.
 
The Source View divides into two parts.
 
Figure 5, Default Assembler View
The left pane contains the program’s source code and the right, the assembler version. The Assembler view provides three viewing options:
*The default view, to view only the absolute address location and machine instructions, as shown in Figure 5.
*The raw bytes, to add a column with the actual values of the instruction parcels.
*The offset, to add a column with the hexadecimal offset from the start of the function.
 
The default Assembler view
The default Assembler view displays the absolute address and the machine instructions. In Figure 5, note line 62 where a breakpoint has been set; one line of source code equates to multiple machine instructions in the Assembler view. If a function contains a nested function, the contents of the nested function are also included; in this example, lines 63 and 65 represent a nested function within line 62.
Including raw bytes or offsets
To view bytes or offsets, use the context menu in the Assembler view by right-clicking in the view and selecting either Include Raw Bytes or Include Offsets. You can also choose to view both raw bytes and offsets.
*Including Raw Bytes
Include the raw bytes to display the actual value of the instruction parcels. Some architectures have variable length instructions, so there is one byte per parcel.
*Including Offsets
Include offsets in the view to see the offset from the start of a function as a hexadecimal value. The function symbolic name displays at the top of the Assembler view, like so:
0x00400600 <main>
When including offsets, each line contains an extra line showing its offset from main.
Adding the offset helps identify the target of an instruction. For example, looking at the selected “jump” instruction jle at line 58 makes it easier to find the offset it references at line 59.
Setting breakpoints in the Assembler view
You can set breakpoints in either the Source view or the Assembler view.
 
RELATED TOPICS 
 
Setting breakpoints in the Assembler view
The Source View