MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


System Administration Commands                         adbgen(1M)



NAME
     adbgen - generate adb script

SYNOPSIS
     /usr/lib/adb/adbgen [-m model] filename.adb ...


DESCRIPTION
     adbgen makes it possible to write adb(1) scripts that do not
     contain hard-coded dependencies on structure member offsets.
     The input to adbgen is a file named filename.adb  that  con-
     tains header information, then a null line, then the name of
     a structure, and finally an adb script.  adbgen  only  deals
     with one structure per file; all member names are assumed to
     be in this structure. The output of adbgen is an adb  script
     in filename. adbgen operates by generating a C program which
     determines structure member offsets and sizes, which in turn
     generate the adb script.


     The header lines, up to the null line, are  copied  verbatim
     into  the generated C program. Typically, these are #include
     statements,  which  include  the  headers   containing   the
     relevant structure declarations.


     The adb script part may contain any valid adb commands  (see
     adb(1)), and may also contain adbgen requests, each enclosed
     in braces ({}). Request types are:

         o    Print a  structure  member.  The  request  form  is
              {member,format}.  member  is  a  member name of the
              structure given earlier, and format  is  any  valid
              adb  format  request  or  any  of the adbgen format
              specifiers (such as {POINTER})  listed  below.  For
              example,  to  print  the  ppid  field  of the proc
              structure as a  decimal  number,  you  would  write
              {ppid,d}.

         o    Print the appropriate adb format character for  the
              given  adbgen  format  specifier. This action takes
              the data model into consideration. The request form
              is  {format  specifier}.  The  valid  adbgen format
              specifiers are:


              {POINTER}     pointer value in hexadecimal


              {LONGDEC}     long value in decimal





SunOS 5.11          Last change: 20 Feb 1998                    1






System Administration Commands                         adbgen(1M)



              {ULONGDEC}    unsigned long value in decimal


              {ULONGHEX}    unsigned long value in hexadecimal


              {LONGOCT}     long value in octal


              {ULONGOCT}    unsigned long value in octal



         o    Reference a structure member. The request  form  is
              {*member,base}.  member  is  the  member name whose
              value is desired, and base is an adb register  name
              which  contains  the base address of the structure.
              For example, to get the ppid  field  of  the  proc
              structure, you would get the proc structure address
              in an adb  register,  for  example  
OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™