adb macros usrlibadb


adb macros & /usr/lib/adb

We will be talking about adb macros in much greater detail in following chapters and using them throughout case histories. However, since this an introduction to adb, let's introduce you to the concept of adb macros for a moment.

Although adb has a very limited set of commands, they can be bundled into fairly powerful combinations of commands known as "macros." Macros are stored in individual files in a known directory. They are ASCII files that are invoked by name and are read in as if they were keystrokes you had typed from the keyboard. Where's the power in that, you might ask? Maybe we should let you discover that for yourself.

adb macros enable you to build a set of common commands, name them, save them, and invoke as them needed. Macros also can be designed to call other macros, allowing for even more analysis power with minimal effort on your part.

Numerous macro files are provided with Solaris 1 in the /usr/lib/adb directory. On Solaris 2 systems you'll find the adb macros in /usr/kvm/lib/adb . Most of the macros provided by Sun are used to print out commonly needed structures from the kernel, usually presented in easy-to-read formats.

Sun does not provide macros specifically intended for use with user program debugging, although some of the provided macros are helpful. For example, the macros that provide stack tracebacks can be used with user programs. Generally, if you have structures or lists for which macros might be useful, you will want to write and use your own macros.

We'll be talking about how to write your own macros in great detail in Chapter 14.



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