Skip Navigation Links | |
Exit Print View | |
Oracle Solaris Modular Debugger Guide Oracle Solaris 11.1 Information Library |
Scoping Within User-Level Applications and Shared Libraries
Using the Scoping Operator With a Kernel Module
Dcmd and Walker Name Resolution
4. Using MDB Commands Interactively
9. Debugging With the Kernel Memory Allocator
Arithmetic expansion is performed to determine the value of an expression. MDB commands can be preceded by expressions that represent a start address or a repeat count. Arithmetic expansion can also be performed to compute a numeric argument for a dcmd. An expression can appear in an argument list enclosed in square brackets preceded by a dollar sign ($[expr]). In this case, the expression is replaced by its arithmetic value.
Expressions can contain any of the following special words:
The specified integer value. Integer values can be prefixed with 0i or 0I to indicate binary values, 0o or 0O to indicate octal values, 0t or 0T to indicate decimal values, and 0x or 0X to indicate hexadecimal values (the default).
The specified decimal floating point value, converted to its IEEE double-precision floating point representation.
The integer value computed by converting each character to a byte equal to its ASCII value. Up to eight characters can be specified in a character constant. Characters are packed into the integer in reverse order (right-to-left), beginning at the least significant byte.
The value of the variable named by identifier.
The value of the symbol named by identifier.
The value of expression.
The value of dot.
The most recent value of dot used to execute a dcmd.
The value of dot incremented by the current increment.
The value of dot decremented by the current increment.
The increment is a global variable that stores the total bytes read by the last formatting dcmd. For more information on the increment, refer to the discussion of Formatting Dcmds.
Unary operators are right associative and have higher precedence than binary operators. The unary operators are:
Logical negation
Bitwise complement
Integer negation
Value of a pointer-sized quantity at the object file location corresponding to virtual address expression in the target's virtual address space
Value of a char-sized, short-sized, int-sized, or long-sized quantity at the object file location corresponding to virtual address expression in the target's virtual address space
Value of a one-byte, two-byte, four-byte, or eight-byte quantity at the object file location corresponding to virtual address expression in the target's virtual address space
Value of a pointer-sized quantity at virtual address expression in the target's virtual address space
Value of a char-sized, short-sized, int-sized, or long-sized quantity at virtual address expression in the target's virtual address space
Value of a one-byte, two-byte, four-byte, or eight-byte quantity at virtual address expression in the target's virtual address space
Binary operators are left associative and have lower precedence than unary operators. The binary operators, in order of precedence from highest to lowest, are:
Integer multiplication
Integer division
Left-hand side rounded up to next multiple of right-hand side
Integer addition
Integer subtraction
Bitwise shift left
Bitwise shift right
Logical equality
Logical inequality
Bitwise AND
Bitwise exclusive OR
Bitwise inclusive OR