AXD Desktop
5.5 System Views menu
5.5.8 Debugger Internals system view
The Debugger Internals system view has two tabbed pages:
• Internal Variables
• Statistics on page 5-72.
Internal Variables
The first tabbed page of the Debugger Internals system view shows Internal Variables, as shown in Figure 5-90 on page 5-69.
Figure 5-90 Debugger Internals, Internal Variables The debugger, like most programs, uses variables. The internal variables used by the debugger depend on the target in use. If you are using Multi-ICE to debug a hardware target, for example, you see different internal variables from those described here. If you are using RealView ARMulator ISS, the variables displayed depend on the processor you are simulating. They generally include the following:
$statistics This is a group of internal variables that you can examine more clearly on the Statistics tab (see Statistics on page 5-72) or by using a CLI command (see statistics on page 6-54).
$rdi_log This variable controls how target information is logged in the RDI Log tab of the Output system view, shown in Figure 5-83 on page 5-63. If it is unset (the default) then no logging occurs. The two least significant bits have the following meanings:
Bit 0 RDI (0 = off, 1 = on).
Bit 1 Device Driver Logging (0 = off, 1 = on).
This variable is used for diagnostic purposes to track communication between the debugger and the target and so is not normally required.
$target_fpu This is an enumeration that controls the way that floating point numbers are displayed by the debugger. It is important to ensure the correct display of float and double values in memory that this variable is set to a value that is appropriate for the target in use.
If you attempt to change this value, a validity test checks that the new settings are compatible with the representation of floating point values in the current image. Valid settings and their meanings are:
1 Selects pure-endian doubles (softVFP). This is the default setting for images built with RealView Developer Suite tools.
Values are read from ordinary registers.
2 Selects mixed-endian doubles (softFPA). Values are read from ordinary registers.
3 Selects hardware Vector Floating Point unit (VFP). Values are read from registers CP10 and CP11.
4 Selects hardware Floating Point Accelerator (FPA). Values are read from registers CP1 and CP2.
5 Reserved.
Incompatible settings are accepted by the debugger but a warning is given.
SoftVFP and SoftFPA images run correctly on a target whether or not hardware floating point is present. FPA images can also run correctly without hardware floating point, but only if the Floating Point Emulator in RealView ARMulator ISS is active. VFP images require appropriate hardware, or an RealView ARMulator ISS that simulates it.
For further details, and details of the software to install appropriate support code, see the RealView Compilation Tools v2.1 Compiler and Libraries Guide.
$image_cache_enable
This variable holds internal debugging information when using Trace Debug Tools (TDT) on a target that must not stop execution. Such information would otherwise be lost and so is held locally in the host computer memory. This information is useful only to the debugger and cannot be accessed directly.
$clock This variable applies to RealView ARMulator ISS only and is based on the RealView ARMulator ISS clock speed setting. This variable is unavailable where the RealView ARMulator ISS clock speed is set to real time. Where the RealView ARMulator ISS clock speed is set to simulated, this variable contains the number of simulated microseconds that have elapsed since the application program began execution (see Configure Target... on page 5-86). This variable is read-only.
In addition to these variables, some debug targets can create their own variables. These are named $<proc_name>$<var_name>, where:
<proc_name> is the name of the processor, as shown in the Target tab of the Control system view (for example, ARM720T).
<var_name> is the name of the variable, and can include:
irq (For example, $ARM720T$irq.) A target can export this variable to provide a means of asserting the interrupt request pin. To trigger an interrupt manually, set the value to 1. To clear the interrupt, set the value to 0. To take the interrupt exception a processor must have IRQ enabled in the CPSR.
fiq (For example, $ARM720T$fiq.) A target can export this variable to provide a means of asserting the fast interrupt request pin.
To trigger a fast interrupt manually, set the value to 1. To clear the fast interrupt, set it to 0. To take the interrupt exception a processor must have FIQ enabled in the CPSR.
cputime (For example, $ARM720T$cputime.) This variable applies to RealView ARMulator ISS only and contains the best estimate of the time the processor has been running, measured in clock units. A clock unit is the reciprocal of the RealView
ARMulator ISS clock speed setting. This variable is
unavailable where the RealView ARMulator ISS clock speed is set to real time (see Configure Target... on page 5-86). This variable is read only.
Your debug target might create other variables. See the target documentation for details.
You can examine the contents of all these variables, and change the values stored in some of them. For more information about data display formats and data entry formats, see Data formatting on page 4-16.
Debugger Internal Variables pop-up menu
Right-click inside the Debugger Internals system view with the Internal Variables tab selected to display the pop-up menu shown in Figure 5-91.
Figure 5-91 Internal Variables pop-up menu Use this pop-up menu to set properties and to select a display format. See AXD online help for details.
Select Refresh to update and recalculate the displayed data values. This item is useful if the target supports RealMonitor. See also Refresh All on page 5-99.
Statistics
The second tabbed page of the Debugger Internals system view is available only when you use a target simulated by software. The page shows statistics, as in Figure 5-92.
Figure 5-92 Debugger Internals, von Neumann core statistics A group of debugger internal variables contains statistics relating to your current debugging session. These variables are displayed more clearly on the Statistics tab than on the Internal Variables tab. Drag the column divider lines to the left or right to change the column widths if necessary.
The first line of statistics shows values accumulated from the beginning of execution of the program you are debugging, and is labeled $statistics (see also the CLI command statistics on page 6-54).
You can add more lines of statistics, accumulated from later interruptions of program execution. When execution has stopped, to start accumulating a new line of statistics, right-click in the Statistics tab of the Debugger Internals system view, and select Add New Reference Point.
Your debug target might display other statistics. See the RealView ARMulator ISS v1.4 User Guide for full information on the different cycle types that might be displayed and their meaning.Two examples are shown here:
• Statistics for von Neumann debug targets
• Statistics for Harvard debug targets on page 5-73.
Statistics for von Neumann debug targets
When simulating von Neumann architecture cores such as the ARM7TDMI core, shown in Figure 5-92, the following information is displayed:
Reference Points
The name you specify to identify each line of statistics that you add.
Instructions The number of program instructions executed.
Core_Cycles
Internal core cycles indicating the time an instruction spends in the execute stage of the pipeline.
S_Cycles The number of sequential cycles performed. The CPU requests transfer to or from the same address, or an address that is a word or halfword after the preceding address.
N_Cycles The number of nonsequential cycles performed. The CPU requests transfer to or from an address that is unrelated to the address used in the preceding cycle.
I_Cycles The number of internal cycles performed. The CPU does not require a transfer because it is performing an internal function (or running from cache).
C_Cycles The number of coprocessor cycles performed.
Total The sum of the S_Cycles, N_Cycles, I_Cycles, and C_Cycles.
If you use a map file (see RealView ARMulator ISS configuration on page 5-87) the display shows additional information, including:
Wait_States The number of wait-states added by the Mapfile component.
True_Idle_Cycles
The number of I_Cycles less the number that are part of an I-S pair. It is only displayed if you set SpotISCyles to True
Statistics for Harvard debug targets
When simulating Harvard architecture cores such as the ARM9 core and StrongARM®, different statistics are accumulated, shown in Figure 5-93.
In these cases, the meanings are:
Reference Points
The name you specify to identify each line of statistics that you add.
Instructions The number of program instructions executed.
Core_Cycles
The total number of core clock ticks, including stalls because of interlocks and instructions that take more than one cycle.
ID_Cycles Cycles in which both the instruction bus and the data bus were active.
I_Cycles Cycles in which the instruction bus was active and the data bus was idle.
Idle_Cycles Cycles in which both the instruction bus and the data bus were idle.
D_Cycles Cycles in which the data bus was active and the instruction bus was idle.
Total The sum of cycles on the memory bus.
Statistics pop-up menu
Right-click inside the Debugger Internals system view with the Statistics tab selected to display the pop-up menu shown in Figure 5-94.
Figure 5-94 Statistics pop-up menu Use this pop-up menu to add a new line of statistics to the displayed table, or to delete the currently selected line. See AXD online help for details.
Select Refresh to update and recalculate the displayed data values. This item is useful if the target supports RealMonitor. See also Refresh All on page 5-99.