To perform arithmetic calculations while in adb, use the = command. This command directs adb to display the value of an expression in a given format.
Use the = command to convert numbers in one base to another, to double-check the arithmetic performed by a program, and to display complex addresses in easier form. For example, the following command displays the hexadecimal number ``0x2a'' as the decimal number 42:
0x2a=dHowever, the following command displays it as the ASCII character asterisk (*):
0x2a=cExpressions in a command may have any combination of symbols and operators. To compute the value of external symbols, type:
=3n"C Stack Backtrace"The system then displays the following message:
C Stack Backtrace