Reading and understanding macros


Since adb macros contain adb commands, you should first become comfortable with adb in general before moving on to macros. Once you are ready to tackle macros, probably the easiest way to get started is by looking at the macros provided on your UNIX system while trying out the commands on a live kernel or a set of system crash dump files. If you happen to start off with the more complex macros, it is quite easy to become discouraged rather quickly, so try to work with the simplier macros at first.

Invoking adb macros

The first thing we need to understand is that some macros start working at adb 's current address, dot (.), whereas others will specify a starting location internally.

While in adb , macros are called by using the command syntax:

  $<macroname  

If you need to feed the macro a new current address to work with, or a symbol name , you invoke it by using the syntax:

  address$<macroname  

In this chapter, we will explore macros that demonstrate examples of each syntax.



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