1.3.83 inspect, print

Displays the output of an expression (128 character limit) and also records the result in a new debugger variable, $n, where n is a number. Results from the print command can be used successively in expressions using the $ character. If you do not want the results recorded in a debugger variable, use the output command instead.

Syntax

print [/flag] [expression]
inspect [/flag] [expression]

Where:

flag

Specifies the output format:

x

Hexadecimal (casts the value to an unsigned integer prior to printing in hexadecimal)

d

Signed decimal. This is the default.

u

Unsigned decimal

o

Octal

t

Binary

a

Absolute hexadecimal address

c

Character

f

Floating-point

s

Default format from the expression.

expression

Specifies an expression that is evaluated and the result is returned. If no expression is specified then the last expression is repeated.

Note:

If your expression accesses memory then a default address variable is set to the location after the last accessed address. Some commands, such as x, use this default value if no address is specified.

Example 1-86 Examples

print (int*)8                    # Cast a number as a pointer
print 4+4                        # Display result of expression in decimal
print "initializing..."          # Display progress information
print /x $PC                     # Display address in PC register (hexadecimal)
Non-ConfidentialPDF file icon PDF versionARM DUI0452Z
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.