DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
adb: absolute debugger

Computing numbers and displaying text

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=d
However, the following command displays it as the ASCII character asterisk (*):
   0x2a=c
Expressions in a command may have any combination of symbols and operators. To compute the value of external symbols, type:
   main+5=X


NOTE: The = command can also be used to display literal strings. This is useful in an adb script where you may wish to display comments about the script as it performs its commands. For example, the following command spaces three lines:
   =3n"C Stack Backtrace"
The system then displays the following message:
   C Stack Backtrace


Next topic: An example: directory and inode dumps
Previous topic: Using UNIX commands

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003