|Non-Confidential||PDF version||ARM DUI0452Z|
|Home > DS-5 Debugger commands > Conformance and usage rules for DS-5 Debugger commands > Expressions within DS-5|
Some DS-5 commands accept expressions. There are many types of expressions accepted by the debugger that enable you to extend the operation of a command. For example, binary mathematical expressions, references to module names, or calls to functions.
In an expression you can access the content of registers by using the $ character and the register name, for example:
print 4+$R0 # add 4 to the content of R0 register and print result
Results from the print commands are recorded in debugger variables. Other commands, such as breakpoint or watchpoint creating commands, the start command, and the memory command, also use debugger variables to record the ID of the new resource. Each of these debugger variables is assigned a number and can be used subsequently in expressions by using the $ character.
You can access print results or resource IDs using the debugger variables:
Print result or ID in the last assigned debugger variable.
Print result or ID in the second-to-last debugger variable.
Print result or ID in the debugger variable with number
You can also use the following debugger variables:
Current working directory.
Current compilation directory.
Entry point of the current image.
Current image directory.
Current script directory.
Current date and time in string format.
Number of milliseconds since 1st Jan 1970.
Current operating system process ID.
Current thread ID for a multi-threaded application.
Current processor ID for a Symmetric MultiProcessing (SMP) systems.
Current Virtual Machine ID (VMID) for systems that support hypervisor / virtual machine debugging.
$thread is uniquely
assigned by the debugger for the current context reported by the OS
awareness plugin. If no OS awareness plugin is loaded,
$thread tracks the current core,
$pid is assigned for the
debugger for the current context by the OS awareness plugin. If no OS
awareness plugin is loaded,
the current core,