Chapter 12. adb Macros: Part One


One of the most powerful and commonly used features of adb also happens to be one of the least well documented: adb macros. adb allows the user to read in adb commands from ASCII files instead of typing them by hand. These files, adb macro files, can contain very simple one line commands or more complex sequences that in turn can read in other macros, creating several layers of nested invocations.

The gurus who analyze UNIX system crash dump savecore files daily use macros often, saving themselves a lot of time as well as wear and tear on their fingers.

Even though adb macros are simply adb commands stored in a file, writing them is still a bit of a black art in its own right. Vendors, such as Sun, even go so far as to provide a tool to automatically generate adb macros so that the programmer need not write them from scratch. This tool is called adbgen and requires use of a C compiler.

Not everyone has access to a C compiler, so in this and the next two chapters we will not only tell you about some of the standard adb macros you might find on your UNIX system, we will also show you how to write and use your own macros without depending on adbgen .



PANIC. UNIX System Crash Dump Analysis Handbook
PANIC! UNIX System Crash Dump Analysis Handbook (Bk/CD-ROM)
ISBN: 0131493868
EAN: 2147483647
Year: 1994
Pages: 289
Authors: Chris Drake

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net