Totalview® for HPC Reference Guide : PART I Using the CLI : Chapter 2 CLI Commands : dexamine
dexamine
Displays memory contents
Format 
dexamine [ -column_count cnt ] [ -countcnt ] [ -data_only ] [ -show_chars ] [ -string_length len ] [ -format fmt ] [ -memory_info] [ -wordsize size ] variable_or_expression
Arguments 
-cols| -column_count cnt
Specifies the number of columns to display. Without this option, the CLI determines this number of columns based on the data’s wordactid size and format.
-c | -count cnt
Specifies the number of elements to examine. Without this option, the CLI displays the entire object. This number is determined by the object’s datatype. If no type is available, the default value for cnt is 1 element.
-d | -data_only
Does not display memory values with a prefixed address: field or address annotations. This option is incompatible with -memory_info.
-f | -format fmt
Specifies the format to use when displaying memory. The default format is hex. You can abbreviate each of these to the first character in the format’s name.
a | address
Interprets memory as addresses; the word size is always the size of a pointer
b | binary
Binary; this can also be abbreviated to t
c | char
Unsigned character
d | dec
Signed decimal value of size 1, 2, 4, or 8 bytes
f | float
Signed float value, either 4 or 8 byte word size
h | hex
Unsigned hexadecimal value of size 1, 2, 4, or 8 bytes
i | instruction
Sequence of instructions
o | oct
Unsigned octal value of size 1, 2, 4, or 8 bytes
s | string
String
-m | -memory_info
Shows information about the type of memory associated with the address. Without this option, the CLI does not display this information. This argument is incompatible with -data_only. When you use this option, the CLI annotates address each line in the dump as follows:
[d]: .data
[t]: .text
[p]: .plt
[b]: .bss
[?]: Another type of memory (such as stack address)
If you have enabled memory debugging, the following annotations can also appear:
[A]: Allocated block of memory
[D]: Deallocated block of memory
[G]: Address is a guard region
[C]: Address is a corrupted guard region
If the address being examined is within an allocated block, this option tells the Memory Debugger to automatically include the pre-guard region if the user specified guards in the memory debugging configuration.
-sc | -show_chars
Shows a trailing character dump for each line. Without this option, the CLI does not show the trailing characters.
-sl | -string_length len
Specifies the maximum size string to display. Without this option, the length is all characters up to the first null character.
-w | -wordsize size
Specifies the “word size” to apply to the format. The default word size is '1' for most formats. For 'address' format, the word size is always the size of a target pointer. The values can be 1, 2, 4, 8 or one of the following: b (byte), h (half word), w (word), or g (giant).
variable_or_expression
A variable or an expression that can be resolved into a memory address.
Description 
Examines memory at the address of the specified variable or the address resulting from the evaluation of an expression. If you specify an expression, the result of the evaluation must be an lvalue.
In most cases, you will enclose the expression in {} symbols.
NOTE >> Instead of using the listed dexamine options, you can instead use the gdb examine command syntax.
Command alias 
Alias
Definition
Description
x
dexamine
Examines (dumps) memory
Examples 
d1.<> dexamine -f b {dbl_array[1]}
0x7fffff0d70e8: 0100000000000011001100110011001100110011001100110011001100110011
0x7fffff0d70f0:
Examines the memory of element one of dbl_array in binary format.
d1.<> dexamine -wordsize 8 {dbl_array[1]}
0x7fffff0d70e8: 0x4003333333333333
0x7fffff0d70f0:
Examines the memory of element one of dbl_array and applies an eight-bit word size to the formatting output.
d1.<> dexamine -data_only {dbl_array[1]}
0x4003333333333333
Examines the memory of element one of dbl_array and displays only the memory values and not the address field or address annotations.
d1.<> dexamine -format oct {dbl_array[1]}
0x7fffff0d70e8: 00400031463146314631463
0x7fffff0d70f0:
Examines the memory of element one of dbl_array and formats the output in octal.