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

Creating adb scripts

By redirecting adb's standard input file at invocation, adb can be directed to read commands from a text file instead of the keyboard. To redirect the standard input, use the standard redirection symbol < and supply a filename. For example:

   adb sample <script
The file supplied must contain valid adb commands. Such files are called script files, and can be used with any invocation of the debugger.

Scripts are typically used to display the contents of core files after a program error. For example, this file containing the following commands will display most relevant information about a program error:

   120$w
   4095$s
   $v
   =3n
   $m
   =3n"C Stack Backtrace"
   $C
   =3n"C External Variables"
   $e
   =3n"Registers"
   $r
   0$s
   =3n"Data Segment"
   <b,-1/8xna

Next topic: Setting output width
Previous topic: Combining commands on a single line

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