Lists the contents of a register or memory location; lists all register sets of a target; adds register sets, registers, or memory locations; or removes register sets, registers, or memory locations.
display <addr-spec> [<range>] [-s|-ns] [%<conv>] [-np]
display -ms
display <addr-spec>{..<addr>|#<n>} [<range>] [-s|-ns] [%<conv>] [-np]
display <reg-spec> [<n>] [-{d|nr|nv|np} ...] [-s|-ns] [%<conv>]
display <reg-spec>{..<reg>|#<n>} [-{d|nr|nv|np} ...] [-s|-ns] [%<conv>]
display all|r:|nr: [-{d|nr|nv|np} ...] [-s|-ns] [%<conv>]
display [-]regset
display <var-spec> [-np] [-s|-ns] [%<conv>]
display v: [-np] [-s|-ns] [%<conv>]
The following table lists and defines parameters of the display command.
| Command | Description |
|---|---|
| <ms> | On architectures supporting multiple memory spaces, specifies the memory space in which <addr> is to be found. See help for the option -ms of display or mem for more information on memory spaces. If unspecified, the setting "config MemIdentifier" is used. |
| <addr> | Target address in hex format. |
| <count> | Number of memory cells. |
| x<cell-size> | Memory is displayed in units called cells, where each cell consists of <cell-size> bytes. If unspecified, the setting "config MemWidth" is used. |
| h<access-size> | Memory is accessed with a hardware access size of <access-size> bytes. If unspecified, the setting "config MemAccess" is used. |
| {8,16,32,64}bit | Sets both <cell-size> and <access-size>. |
| -np | Don't print anything to the display, only return the data. |
| -ms | On architectures supporting multiple memory spaces, displays the list of available memory spaces including a mnemonic and/or an integer index which may be used when specifying a target address. |
| <a1>{..<a2>|#<n>} | Specifies a range of memory either by two endpoints, <a1> and <a2>, or by a startpoint and a byte count, <a1> and <n>. This alternate syntax is provided mainly for backwards compatibility. The new form of <addr> and <count> should be easier to use and thus preferred. |
| {r|nr} | If multiple registers are specified, then the prefix r: causes a recursive, depth-first traversal of the register hierarchy. The prefix nr: prevents recursion. If unspecified, recursion is the default. Note that different levels of the register hierarchy are represented in the manner of a path with forward-slashes '/' used to delimit the register groups. A name that contains a slash itself can be represented with an escape backward-slash '\' followed by the forward-slash. Further note that a backslash in a doubly-quoted Tcl string is itself an escape character -- in this case two backslashes are required. Alternatively, you may use curly braces '{' and '}' to denote your string in which case just one backslash is necessary. |
| <reg> | A register name or a register group name. |
| ..<reg> | The end point for a range of registers to access. |
| <n> | Number of registers. |
| all | Specifies all registers. |
| -d | Print detailed data book information. |
| -nr | Print only register groups, that is no registers. |
| -nv | Print only register groups and register names, that is no values. |
| -np | Don't print anything to the display, only return the data. |
| regset | Display the register group hierarchy. |
| v: | If this option appears with no <var> following it, then all variables pertinent to the current scope are printed. |
| <var> | Symbolic name of the variable to print. Can be a C expression as well. |
| -s|-ns | Specifies whether each value is to be swapped. For memory, specifies whether each cell is to be swapped. With a setting of -ns, target memory is written in order from lowest to highest byte address. Otherwise, each cell is endian swapped. If unspecified, the setting "config MemSwap" is used. |
| %<conv> | Specifies the type of the data. Possible values for <conv> are given below. The default conversion is set by the radix command for memory and registers and by the config var command for variables. |
| %x | Hexadecimal. |
| %d | Signed decimal. |
| %u | Unsigned decimal. |
| %f | Floating point. |
| %[Q<n>]F | Fixed or Fractional. The range of a fixed point value depends on the (fixed) location of the decimal point. The default location is set by the config command option "MemFixedIntBits". |
| %s | ASCII. |
The examples assume the following settings:
The following table lists and defines examples of the display command.
| Command | Description |
|---|---|
| display 10000 | Displays memory range 0x10000-3 as one cell. |
| display 1:10000 | Displays memory range 0x10000-3, memory space 1, as one cell. |
| display 10000 16 | Displays memory range 0x10000-3f as 16 cells. |
| display 10000 16x1h8 | Displays 16, 1-byte cells, with a hardware access size of 8-bytes per read. |
| display 10000 8bit | Displays one byte, with a hardware access size of one byte. |
| display 10000 -np | Returns one cell, but don't print it to the Command Window. |
| display 10000 -s | Displays one cell with the data endian-swapped. |
| display 10000 %d | Displays one cell in decimal format. |
| display -ms | Displays the available memory spaces, if any. |
| display -regset | Lists all the available register sets on the target chip. |
| display R1 | Displays the value of register R1. |
| display "General Purpose Registers/R1" | Displays the value of register R1 in the General Purpose Register group. |
| display R1 -d | Displays detailed "data book" contents of R1, including bitfields and definitions. |
| display "nr:General Purpose Registers/R1" 25 | Beginning with register R1, display the next 25 registers. Register groups are not recursively searched. |
| display myVar -s %d | Displays the endian-swapped contents of variable myVar in decimal. |