<!-- <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook V3.1//EN" > -->

<!--  This is part of the lcrash HOWTO. -->
<!--  Copyright (C) 2001, 2002 IBM Deutschland Entwicklung GmbH, -->
<!--                           IBM Corporation -->
<!--  See the file lcrash.sgml for copying conditions. -->

<chapter id="cha.commandreference">
  <title>Lcrash Command Reference</title>
  <section id="sec.cmdoverview">
    <title>Command Overview</title>

    <para>Lcrash provides a whole bunch of commands. 
      For some commands synonyms are provided.
      Furthermore the behavior of commands may be platform dependent or
      even a command is not available on a platform.
      A short overview of lcrash commands is given in table
      <xref linkend="tab.commandoverview">.
    </para>
    <para>The following subsections explain lcrash commands in more detail.
      The commands can be grouped as shown in table
      <xref linkend="tab.commandclassification"> - hopefully this helps not
      to loose the overall view of the commands.
    </para>

    <table id="tab.commandoverview" frame="all">
      <title>Overview of lcrash commands</title>
      <tgroup cols="7" colsep="1" rowsep="1" align="left">
	<colspec colname="cmd" colwidth="2*">
	<colspec colname="desc" colwidth="4*">
	<colspec colname="alias"colwidth="2*">
	<colspec colname="alpha" align="center" colwidth="1*">
	<colspec colname="i386" align="center" colwidth="1*">
	<colspec colname="ia64" align="center" colwidth="1*">
	<colspec colname="s390" align="center" colwidth="1*">
	<thead>
	  <row>
	    <entry>Command</entry>
	    <entry>Description</entry>
	    <entry>Aliases</entry>
	    <entry>alpha</entry>
	    <entry>i386</entry>
	    <entry>ia64</entry>
	    <entry>s390(x)</entry>
	  </row>
	</thead>
	<tbody>
	  <row>
	    <entry><command>base</command></entry>
	    <entry>Display a number in binary, octal, decimal, and hex.</entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>deftask</command></entry>
	    <entry>Set/display the default task.</entry>
	    <entry colname="alias"><command>dt</command></entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>dis</command></entry>
	    <entry>Display the disassembled code.</entry>
	    <entry colname="alias"><command>id</command></entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>dump</command></entry>
	    <entry>Display dump.</entry>
	    <entry colname="alias"><command>md</command>,
	      <command>od</command></entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>findsym</command></entry>
	    <entry>Display symbol information for given symbol addresses and
	      names.</entry>
	    <entry colname="alias"><command>fsym</command>, 
	      <command>symbol</command></entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>help</command></entry>
	    <entry>Display command help.</entry>
	    <entry colname="alias"><command>?</command></entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>history</command></entry>
	    <entry>Set/display command history of lcrash.</entry>
	    <entry colname="alias"><command>h</command></entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>ldcmds</command></entry>
	    <entry>Dynamically load a library of lcrash commands.</entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>livedump</command></entry>
	    <entry>Create a system dump from live system memory.</entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>load</command></entry>
	    <entry>Load a sial macro.</entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>mktrace</command></entry>
	    <entry>Construct a stack backtrace from scratch.</entry>
	    <entry colname="i386">x</entry>
	  </row>
	  <row>
	    <entry><command>mmap</command></entry>
	    <entry>Display information for mm_struct structs. </entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>module</command></entry>
	    <entry>Display information for module structs.</entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>namelist</command></entry>
	    <entry>Add type information from namelist, list opened
	      namelists.</entry>
	    <entry colname="alias"><command>nmlist</command>,
	      <command>addtypes</command></entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>page</command></entry>
	    <entry>Display information for page structs.</entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>print</command></entry>
	    <entry>Evaluate and print expressions.</entry>
	    <entry colname="alias"><command>p</command>,<command>pb</command>,
	      <command>pd</command>,<command>po</command>,
	      <command>px</command></entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>quit</command></entry>
	    <entry>Exit lcrash.</entry>
	    <entry colname="alias"><command>q</command>,
	      <command>q!</command></entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>report</command></entry>
	    <entry>Display a crash dump report.</entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>s390dbf</command></entry>
	    <entry>Display Debug logs.</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>sizeof</command></entry>
	    <entry>Determine size of types. Display offset of struct
	      members.</entry>
	    <entry colname="alias"><command>offset</command></entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>stat</command></entry>
	    <entry>Display system statistics and the log_buf array.</entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>strace</command></entry>
	    <entry>Displays all complete and unique stack traces.</entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>symtab</command></entry>
	    <entry>Add/remove/list symbol table information.</entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>task</command></entry>
	    <entry>Display information for task_struct structs.</entry>
	    <entry colname="alias"><command>ps</command></entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>trace</command></entry>
	    <entry>Display stack trace for task_struct.</entry>
	    <entry colname="alias"><command>t</command></entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>unload</command></entry>
	    <entry>Unload sial macros.</entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>vi</command></entry>
	    <entry>Start a vi session of a sial file/function.</entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>vtop</command></entry>
	    <entry>Determine the physical address of an virtual one.</entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>walk</command></entry>
	    <entry>Walk a linked list of kernel structures or memory
	      blocks.</entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	  <row>
	    <entry><command>whatis</command></entry>
	    <entry>Display type information and symbol information.</entry>
	    <entry colname="alpha">x</entry>
	    <entry colname="i386">x</entry>
	    <entry colname="ia64">x</entry>
	    <entry colname="s390">x</entry>
	  </row>
	</tbody>
      </tgroup>
    </table>

    <table id="tab.commandclassification">
      <title>Classification of <command>lcrash</command> commands</title>
      <tgroup cols="2" colsep="1" rowsep="1" align="left">
	<colspec colname="classification" colwidth="1*">
	<colspec colname="commands" colwidth="2*">
	<tbody>
	  <row>
	    <entry>General Purpose</entry>
	    <entry>
	      <command>base</command>,
	      <command>help</command>,
	      <command>history</command>,
	      <command>ldcmds</command>,
	      <command>quit</command>
	    </entry>
	  </row>
	  <row>
	    <entry>Data Inspection</entry>
	    <entry>
	      <command>dis</command>,
	      <command>dump</command>,
	      <command>print</command>,
	      <command>vtop</command>,
	      <command>walk</command>
	    </entry>
	  </row>
	  <row>
	    <entry>Accessing Symbol and Type Information</entry>
	    <entry>
	      <command>findsym</command>,
	      <command>namelist</command>,
	      <command>sizeof</command>,
	      <command>symtab</command>,
	      <command>whatis</command>
	    </entry>
	  </row>
	  <row>
	    <entry>Support for Special Structures</entry>
	    <entry>
	      <command>deftask</command>,
	      <command>mmap</command>,
	      <command>module</command>,
	      <command>page</command>,
	      <command>task</command>
	    </entry>
	  </row>
	  <row>
	    <entry>Stack Tracing</entry>
	    <entry>
	      <command>mktrace</command>,
	      <command>strace</command>,
	      <command>trace</command>,
	    </entry>
	  </row>
	  <row>
	    <entry>Sial Support</entry>
	    <entry>
	      <command>load</command>,
	      <command>unload</command>,
	      <command>vi</command>
	    </entry>
	  </row>
	  <row>
	    <entry>Other Commands</entry>
	    <entry>
	      <command>livedump</command>,
	      <command>report</command>,
	      <command>s390dbf</command>,
	      <command>stat</command>
	    </entry>
	  </row>
	</tbody>
      </tgroup>
    </table>
  </section>

  <section id="sec.commonoptions">
    <title>Common Options</title>
    <para>Most lcrash commands have two things in common:
    </para>
    <orderedlist numeration="arabic">
      <listitem>
	<para>Command output can be piped to normal shell commands like
	  <command>less</command> or <command>grep</command>.
	</para>
      </listitem>
      <listitem>
	<para>They support the option <option>-w</option> to write output
	  to a file.
	</para>
      </listitem>
    </orderedlist>
    <para>To pipe the output of a command to <command>less</command>, just
      specify <command>lcrash_command | less</command>. Take care to use a blank
      before the pipe symbol, otherwise it could be misinterpreted by lcrash.
    </para>

    <para>When using <command>lcrash_command <option>-w</option>
	<parameter>filename</parameter></command>, <command>lcrash</command>
      appends the output of the executed command to the file
      <parameter>filename</parameter>.
    </para>
  </section>

  <section id="sec.base">
    <title><command>base</command></title>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>base [-w outfile] numeric_values[s]</screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Display a number in binary, octal, decimal, and hexadecimal. A number in 
a radix other then decimal should be preceded by a prefix that indicates 
its radix as follows:
    
              0x      hexadecimal
              0       octal
              0b      binary
    </screen>
    <example id="ex.base">
      <title>base</title>
      <screen>
>> base 4711 0x4711 04711 0b1000
--------------------------------------------------
    hex: 0x1267
decimal: 4711
  octal: 011147
 binary: 0b1001001100111
--------------------------------------------------
    hex: 0x4711
decimal: 18193
  octal: 043421
 binary: 0b100011100010001
--------------------------------------------------
    hex: 0x9c9
decimal: 2505
  octal: 04711
 binary: 0b100111001001
--------------------------------------------------
    hex: 0x8
decimal: 8
  octal: 010
 binary: 0b1000
--------------------------------------------------
      </screen>
    </example>
  </section>

  <section id="sec.deftask">
    <title><command>deftask</command></title>
    <bridgehead renderas="sect3">Alias</bridgehead>
    <para><command>dt</command></para>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
deftask [-w outfile] [task]
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Set the default task if one is indicated.  Otherwise, display the current 
value of deftask. When 'lcrash' is run on a system core dump, deftask 
gets set automatically to the task that was active when the system PANIC 
occurred.When 'lcrash' is run on a live system, deftask is not set by 
default.

The deftask value is used by 'lcrash' in a number of ways. The trace 
command will display a trace for the default task if one is set. Also, 
the translation of certain virtual addresses (user space) depends upon 
deftask being set.
    </screen>
    <bridgehead renderas="sect3">Note</bridgehead>
    <para> Currently there is no possibility to reset the default task.</para>
    <example id="ex.deftask">
      <title>deftask</title>
      <screen>
>> task
ACTIVE TASKS:

    ADDR    UID    PID   PPID  STATE     FLAGS  NAME
===============================================================================
  18e000      0      0      0      0         0  swapper
  5b0000      0      1      0      1       100  init
  5a8000      0      2      1      1        40  kmcheck
  59a000      0      3      1      1        40  keventd
  57c000      0      4      1      1       840  kswapd
  57a000      0      5      1      1       840  kreclaimd
  578000      0      6      1      1        40  bdflush
  576000      0      7      1      1        40  kupdated
 6edc000      0    231      3      1        40  keventd
 6ed0000      1    287      1      1       140  portmap
 6e60000      0    349      1      1        40  syslogd
 779a000      0    363      1      1       140  klogd
 6d54000      0    401      1      1       140  inetd
 6a0a000    100    448      1      1        40  xfs
 7ac0000      0    467      1      1         0  sulogin
 6948000      0    468    401      1       100  in.telnetd
 68f8000      0    469    468      1       100  login
 67e4000      0    470    469      1       100  bash
 61c8000      0    522    470      0       100  lcrash
===============================================================================
19 active task structs found

>> trace
System is ACTIVE. Set deftask.

>> deftask
No default task set

>> deftask 68f8000
Default task is 0x68f8000

>> trace
================================================================
STACK TRACE FOR TASK: 0x68f8000 (login)

 STACK:
 0 schedule+1076 [0x1c590]
 1 sys_wait4+1050 [0x23fc6]
 2 pgm_system_call+34 [0x130d0]
================================================================

>> deftask
Default task is 0x68f8000
      </screen>
    </example>
  </section>

  <section id="sec.dis">
    <title><command>dis</command></title>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
dis [-f] [-w outfile] [-F funcname]|addr[count|[bcount acount]]
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Display the disassembled code for addr for count instructions (the 
default count is 1). Alternately, display the disassembled code for addr 
with bcount instructions before and acount instructions after. If bcount 
or acount is zero, then no instructions will be displayed before or after 
respectively. If the dis command is issued with the -f command line 
option, additional information will be displayed (opcode and byte size). 
If the dis command is issued with the -F option followed by funcname, 
disassembled code will be displayed for all instructions in the function.
    </screen>
    <example id="ex.dis.i386">
      <title>dis (i386)</title>
      <screen>
      <![CDATA[
>> dis -F memcmp
0xc0251878 <memcmp>:       pushl  %esi
0xc0251879 <memcmp+1>:     pushl  %ebx
0xc025187a <memcmp+2>:     movb   $0x0,%al
0xc025187c <memcmp+4>:     movl   0x14(%esp,1),%esi
0xc0251880 <memcmp+8>:     movl   0xc(%esp,1),%ecx
0xc0251884 <memcmp+12>:    movl   0x10(%esp,1),%edx
0xc0251888 <memcmp+16>:    testl  %esi,%esi
0xc025188a <memcmp+18>:    je     0xc02518a1 <memcmp+41>
0xc025188c <memcmp+20>:    jmp    0xc0251895 <memcmp+29>
0xc025188e <memcmp+22>:    movl   %esi,%esi
0xc0251890 <memcmp+24>:    incl   %ecx
0xc0251891 <memcmp+25>:    incl   %edx
0xc0251892 <memcmp+26>:    decl   %esi
0xc0251893 <memcmp+27>:    je     0xc02518a1 <memcmp+41>
0xc0251895 <memcmp+29>:    movb   (%edx),%al
0xc0251897 <memcmp+31>:    movb   (%ecx),%bl
0xc0251899 <memcmp+33>:    subb   %al,%bl
0xc025189b <memcmp+35>:    movb   %bl,%al
0xc025189d <memcmp+37>:    testb  %al,%al
0xc025189f <memcmp+39>:    je     0xc0251890 <memcmp+24>
0xc02518a1 <memcmp+41>:    movsbl %al,%eax
0xc02518a4 <memcmp+44>:    popl   %ebx
0xc02518a5 <memcmp+45>:    popl   %esi
0xc02518a6 <memcmp+46>:    ret    
0xc02518a7 <memcmp+47>:    nop  

>> dis 0xc025188e 10 -f
0xc025188e <memcmp+22>:    0x0089  movl   %esi,%esi  (2 bytes)
0xc0251890 <memcmp+24>:    0x0041  incl   %ecx  (1 byte)
0xc0251891 <memcmp+25>:    0x0042  incl   %edx  (1 byte)
0xc0251892 <memcmp+26>:    0x004e  decl   %esi  (1 byte)
0xc0251893 <memcmp+27>:    0x0074  je     0xc02518a1 <memcmp+41>  (2 bytes)
0xc0251895 <memcmp+29>:    0x008a  movb   (%edx),%al  (2 bytes)
0xc0251897 <memcmp+31>:    0x008a  movb   (%ecx),%bl  (2 bytes)
0xc0251899 <memcmp+33>:    0x0028  subb   %al,%bl  (2 bytes)
0xc025189b <memcmp+35>:    0x0088  movb   %bl,%al  (2 bytes)
0xc025189d <memcmp+37>:    0x0084  testb  %al,%al  (2 bytes)
      ]]>
      </screen>
    </example>
    <example id="ex.dis.s390">
      <title>dis (s390)</title>
      <screen>
      <![CDATA[
>> idis 00154d8c 19
0x154d8c <memcmp>:       lhi    %r0,0
0x154d90 <memcmp+4>:     lr     %r5,%r2
0x154d92 <memcmp+6>:     j      0x154da2 <memcmp+22>
0x154d96 <memcmp+10>:    ahi    %r5,1
0x154d9a <memcmp+14>:    ahi    %r3,1
0x154d9e <memcmp+18>:    ahi    %r4,-1
0x154da2 <memcmp+22>:    ltr    %r4,%r4
0x154da4 <memcmp+24>:    je     0x154dc0 <memcmp+52>
0x154da8 <memcmp+28>:    ic     %r0,0(%r5)
0x154dac <memcmp+32>:    ic     %r1,0(%r3)
0x154db0 <memcmp+36>:    sr     %r0,%r1
0x154db2 <memcmp+38>:    lr     %r2,%r0
0x154db4 <memcmp+40>:    sll    %r2,24
0x154db8 <memcmp+44>:    sra    %r2,24
0x154dbc <memcmp+48>:    je     0x154d96 <memcmp+10>
0x154dc0 <memcmp+52>:    lr     %r2,%r0
0x154dc2 <memcmp+54>:    sll    %r2,24
0x154dc6 <memcmp+58>:    sra    %r2,24
0x154dca <memcmp+62>:    br     %r14
      ]]>
      </screen>
    </example>
  </section>

  <section id="sec.dump">
    <title><command>dump</command></title>
    <bridgehead renderas="sect3">Alias</bridgehead>
    <para><command>md</command>,<command>od</command></para>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
dump [-d] [-o] [-x] [-B] [-D] [-H] [-W] [-w outfile] addr [count]
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Display count values starting at kernel virtual address addr in one of 
the following formats: decimal (-d), octal (-o), or hexadecimal (-x).  
The default format is hexadecimal, and the default count is 1. If addr is 
preceeded by a pound sign ('#'), it will be treated as a page number 
(PFN).
    </screen>
    <bridgehead renderas="sect3">Note</bridgehead>
    <para>Output of dump command depends on endianess of the host platform.
      E.g. on i386 lcrash will show words, half-words and double-words in little
      endianess.
      In conclusion on little endian platforms only the option -B will force
      lcrash to show you the bytes in the order as they really occur in the
      dump.</para>
    <example id="ex.dump">
      <title>dump</title>
      <screen>
>> dump c02e4820 8 -o
0xc02e4820: 00000000011417432074 00000000017035267151 
            00000000016231273040 00000000015633664563 
0xc02e4830: 00000000006213431040 00000000004016030456 
            00000000015733671050 00000000014524040164 

>> dump c02e4820 8 -d
0xc02e4820: 01279145020 02020961897 01919252000 01852795251 
0xc02e4830: 00841888288 00540553518 01869574696 01699758196 

>> dump c02e4820 8 -x
0xc02e4820: 4c3e343c 78756e69 72657620 6e6f6973 : <4>Linux version
0xc02e4830: 322e3220 2038312e 6f6f7228 65504074 :  2.2.18 (root@Pe

>> dump c02e4820 8 -W
0xc02e4820: 4c3e343c 78756e69 72657620 6e6f6973 : <4>Linux version
0xc02e4830: 322e3220 2038312e 6f6f7228 65504074 :  2.2.18 (root@Pe

>> dump c02e4820 8 -B
0xc02e4820: 3c 34 3e 4c 69 6e 75 78                         : <4>Linux

>> dump c02e4820 8 -H
0xc02e4820: 343c 4c3e 6e69 7875 7620 7265 6973 6e6f : <4>Linux version

>> dump c02e4820 8 -D
0xc02e4820: 78756e694c3e343c 6e6f697372657620 : <4>Linux version
0xc02e4830: 2038312e322e3220 655040746f6f7228 :  2.2.18 (root@Pe
0xc02e4840: 75732e6d7569746e 28202965642e6573 : ntium.suse.de) (
0xc02e4850: 7372657620636367 35392e32206e6f69 : gcc version 2.95
      </screen>
    </example>
  </section>

  <section id="sec.findsym">
    <title><command>findsym</command></title>
    <bridgehead renderas="sect3">Alias</bridgehead>
    <para><command>fsym</command>,<command>symbol</command></para>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
findsym 
        symname | symaddr [symname | symaddr [...] ]
        -f string [...]
        [-w outfile]
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Display relevant information for each requested symbol name and/or symbol 
address.

OPTIONS:
 symname | symaddr [symname | symaddr [...] ]
       Search symbol information for given symbol names and addresses.
 -f string [...]
       Search symbol information for symbols which names start with given
       strings. Use this version if you don't know the full symbol name.
    </screen>
    <example id="ex.findsym">
      <title>findsym</title>
      <screen>
>> findsym 0xc0150000
    ADDR  OFFSET  TYPE         NAME
============================================================
c0150000     144  GLOBAL_TEXT  ext2_truncate
============================================================
1 symbol found

>> findsym ext2_truncate
    ADDR  OFFSET  TYPE         NAME
============================================================
c014ff70       0  GLOBAL_TEXT  ext2_truncate
============================================================
1 symbol found

>> findsym 0xc0300000 init_mm module_list 0xc02f0000 memcmp
    ADDR  OFFSET  TYPE         NAME
============================================================
c0300000     480  GLOBAL_DATA  ip_masq_d_table
c02a90a0       0  GLOBAL_DATA  init_mm
c02ad128       0  GLOBAL_DATA  module_list
c02f0000     800  LOCAL_DATA   ro_bits
c0251878       0  GLOBAL_TEXT  memcmp
============================================================
5 symbols found
      </screen>
    </example>
  </section>

  <section id="sec.help">
    <title><command>help</command></title>
    <bridgehead renderas="sect3">Alias</bridgehead>
    <para><command>?</command></para>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
help [-w outfile] [all | command_list]
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Display a description of the named functions, including syntax.  The 
'all' option displays help information for every command.
    </screen>
    <example id="ex.help">
      <title>help</title>
      <screen>
>> help
?                id               p                sizeof           
base             ldcmds           page             stat             
bt               livedump         pb               strace           
deftask          load             pd               symtab           
dis              md               po               t                
dt               mktrace          print            task             
dump             mmap             ps               trace            
findsym          module           px               unload           
fsym             mt               q                vi               
h                namelist         q!               vtop             
help             nmlist           quit             walk             
history          od               report           whatis           

>> ? h
command: history [n]

    Without the optional parameter, displays the current history. Optional 
    argument 'n' specifies the number of commands that are kept in the 
    history list.
      </screen>
    </example>
  </section>

  <section id="sec.history">
    <title><command>history</command></title>
    <bridgehead renderas="sect3">Alias</bridgehead>
    <para><command>h</command></para>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
history [n]
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Without the optional parameter, displays the current history. Optional 
argument 'n' specifies the number of commands that are kept in the 
history list.
    </screen>
    <bridgehead renderas="sect3">Note</bridgehead>
    <para>
      To find out how the history mechanism works, please refer to
      <xref linkend="sec.userinterface">.
    </para>
    <example id="ex.history">
      <title>history</title>
      <screen>
>> history
  1: base 4711 0x4711 04711 0b1000
  2: help
  3: ? h

>> h 2

>> h
  2: help
  3: ? h
      </screen>
    </example>
  </section>

  <section id="sec.ldcmds">
    <title><command>ldcmds</command></title>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
ldcmds cmd_library
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Dynamically load a library of lcrash commands.
    </screen>
  </section>

  <section id="sec.livedump">
    <title><command>livedump</command></title>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
livedump [-l level]
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Create a system dump from live system memory.
    </screen>
  </section>

  <section id="sec.load">
    <title><command>load</command></title>
    <bridgehead renderas="sect3">Alias</bridgehead>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
load filename|directory
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Load a sial macro from a file or a directory. In the case of a directory, 
all files in that directory will be loaded.
    </screen>
  </section>

  <section id="sec.mktrace">
    <title><command>mktrace</command></title>
    <bridgehead renderas="sect3">Platform Dependency</bridgehead>
    <para>i386</para>
    <bridgehead renderas="sect3">Alias</bridgehead>
    <para><command>mt</command></para>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
mktrace [-l] [-w outfile] [stack_addr SP PC FP RA] | [-F [-a] [free_list]]
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Construct a stack backtrace from scratch using an arbitrary stack_addr, 
SP, PC, FP, and RA. Alternately, free a trace record that was previously 
allocated, list currently allocated trace records, and delete selected or 
all active trace records.
    </screen>
  </section>

  <section id="sec.mmap">
    <title><command>mmap</command></title>
    <bridgehead renderas="sect3">Alias</bridgehead>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
mmap [-f] [-n] [-w outfile] mmap_list
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Display relevant information for each entry in mmap_list. 
    </screen>
    <example id="ex.mmap">
      <title>mmap</title>
      <screen>
>> task ce4ac000
    ADDR    UID    PID   PPID  STATE     FLAGS  NAME
===============================================================================
ce4ac000   4640   1966   1951      1         0  netscape
===============================================================================
1 active task struct found

>> print ((task_struct*)ce4ac000)->mm
0xc97e7540

>> mmap 0xc97e7540
    ADDR  MM_COUNT  MAP_COUNT      MMAP
=======================================
c97e7540         1         40  c571fa60
=======================================
1 active mm_struct struct found

>> mmap -f 0xc97e7540
    ADDR  MM_COUNT  MAP_COUNT      MMAP
=======================================
c97e7540         1         40  c571fa60

  START_CODE:0x8048000, END_CODE:0x8b5d422
  START_DATA:0x0, END_DATA:0x8d4be68
  START_BRK:0x8d99664, START_STACK:0xbffff210
  ARG_START:0xbffff3a6, ARG_END:0xbffff3b3
  TOTAL_VM:0x10ba

=======================================
1 active mm_struct struct found

>> mmap -n 0xc97e7540
    ADDR  MM_COUNT  MAP_COUNT      MMAP
=======================================
c97e7540         1         40  c571fa60

    ADDR  VM_START    VM_END  VM_PGOFF VM_FLAGS
-----------------------------------------------
c571fa60   8048000   8b5e000         0     1875
c571f220   8b5e000   8d4c000  11620352     1873
c571f320   8d4c000   8dce000         0       77
c571f2a0  40000000  40016000         0      875
c571f160  40016000  40017000     86016      873
c571f9e0  4002a000  4002b000         0       73
c571ff60  4002b000  4002c000         0       75
c59dfd20  4002c000  4002d000         0       73
c571f0a0  4002d000  40076000         0       75
c59dfee0  40076000  4007a000    294912       73
c6582b20  4007a000  4007b000         0       73
c59df120  4007b000  40083000         0       75
c274d7e0  40083000  40085000     28672       73
c274d120  40085000  4009a000         0       75
c274dee0  4009a000  4009c000     81920       73
c274dd60  4009c000  4009d000         0       73
c274d9a0  4009d000  400b1000         0       75
c274da60  400b1000  400b2000     77824       73
c274dc60  400b2000  400b3000         0       73
c274daa0  400b3000  400c0000         0       75
c274dc20  400c0000  400c2000     49152       73
c274de20  400c2000  400cf000         0       75
c274dbe0  400cf000  400d0000     49152       73
c274d560  400d0000  401ad000         0       75
c274d660  401ad000  401b3000    901120       73
c274d5a0  401b3000  401b4000         0       73
c274dd20  401b4000  401b6000         0       75
c274db60  401b6000  401b7000      4096       73
c274da20  401b7000  401f0000         0       75
c274d8a0  401f0000  401fc000    229376       73
c274dea0  401fc000  401ff000         0       73
c274d860  401ff000  4021c000         0       75
c274db20  4021c000  4021d000    114688       73
c274dba0  4021d000  40326000         0       75
c274d760  40326000  4032c000   1081344       73
c274d060  4032c000  40330000         0       73
c274d2a0  50000000  50002000         0       70
c571f060  50002000  50012000      8192       77
c274d8e0  50012000  50014000     73728       70
c571fc60  bfffd000  c0000000     -8192      177
-----------------------------------------------

=======================================
1 active mm_struct struct found
      </screen>
    </example>
  </section>

  <section id="sec.module">
    <title><command>module</command></title>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
module 
        [modulename]
        [-f [modulename]]
        [-i iteration_threshold]
        [-w outfile]
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Display list of loaded modules and module symbols.

OPTIONS:
 modulename
       Display information of (all) module structure(s) in linked list
       module_list of the kernel.
       Shows address of module structure, and size, usecount, name of
       module, and modules that depend on the module.
       Equals "cat /proc/modules" in a running Linux system.
 -f [modulename]
       Show list of exported module symbols of (all) module structure(s)
       in linked list module_list of the kernel.
       Equals "cat /proc/ksyms" in a running Linux system.
 -i iteration_threshold
       By default certain loops are interrupted after 10'000 iterations
       to avoid endless loops while following invalid pointers. Using
       this option you can change the threshold for the current command.
       A value '0' means infinite iteration threshold, i.e. no
       interruption of the loop is caused by reaching the threshold.
 
 The kernel_module can be accessed by using "kernel_module" as
 modulename.
    </screen>
    <example id="ex.module">
      <title>module</title>
      <screen>
>> module
    ADDR      SIZE USED NAME                               REFS 
===========================================================================
d0103000     17928    1 ibmtr_cs                      []
d00fe000      6608    2 ds                            [ibmtr_cs]
d00f3000     23408    2 i82365                        []
d00e6000     46848    0 pcmcia_core                   [ibmtr_cs
                                                       ds
                                                       i82365]
c02ad0e0         0    1 kernel_module                 []
===========================================================================

>> module pcmcia_core
    ADDR      SIZE USED NAME                               REFS 
===========================================================================
d00e6000     46848    0 pcmcia_core                   [ibmtr_cs
                                                       ds
                                                       i82365]
===========================================================================

>> module pcmcia_core -f
EXPORTED MODULE SYMBOLS: 
===========================================================================
        Module: pcmcia_core
        Number of exported symbols: 15

            ADDR NAME [MODULE]

        d00e6120 register_ss_entry                    [pcmcia_core]
        d00e6290 unregister_ss_entry                  [pcmcia_core]
        d00e8d30 CardServices                         [pcmcia_core]
        d00ecb50 MTDHelperEntry                       [pcmcia_core]
        d00f0788 proc_pccard                          [pcmcia_core]
        d00eb800 request_mem_region                   [pcmcia_core]
        d00eb820 release_mem_region                   [pcmcia_core]
        d00f1618 pci_irq_mask                         [pcmcia_core]
        d00ef090 pci_enable_device                    [pcmcia_core]
        d00ef100 pci_set_power_state                  [pcmcia_core]
        d00e6000 __insmod_pcmcia_core_O/lib/modules/2.2.18/pcmcia/pcmcia_
core.o_M3A6ED7D0_V131602 [pcmcia_core]
        d00e6060 __insmod_pcmcia_core_S.text_L37383   [pcmcia_core]
        d00ef280 __insmod_pcmcia_core_S.rodata_L4779  [pcmcia_core]
        d00f0740 __insmod_pcmcia_core_S.data_L3996    [pcmcia_core]
        d00f16e0 __insmod_pcmcia_core_S.bss_L32       [pcmcia_core]

===========================================================================

>> module kernel_module -f -i 10
EXPORTED MODULE SYMBOLS: 
===========================================================================
        Module: kernel_module
        Number of exported symbols: 825

      ADDR NAME [MODULE]
---------------------------------------------------------------------------

0xc027a640 drive_info                           [kernel_module]
0xc023e7c0 boot_cpu_data                        [kernel_module]
0xc023e840 EISA_bus                             [kernel_module]
0xc023e844 MCA_bus                              [kernel_module]
0xc010f224 __verify_write                       [kernel_module]
0xc0107680 dump_thread                          [kernel_module]
0xc010e40c dump_fpu                             [kernel_module]
0xc010e4b8 dump_extended_fpu                    [kernel_module]
0xc010fa1c __ioremap                            [kernel_module]
0xc010fafc iounmap                              [kernel_module]
WARNING: Iteration threshold reached. Current threshold: 10.
         Use "-i" to change threshold.

===========================================================================
      </screen>
    </example>
  </section>

  <section id="sec.namelist">
    <title><command>namelist</command></title>
    <bridgehead renderas="sect3">Alias</bridgehead>
    <para><command>addtypes</command>,<command>nmlist</command></para>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
namelist
        [-a namelist]
        [index_number]
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Add/list opened namelists, i.e. files with type information.

OPTIONS:
 -a namelist
       Add type information of new namelist.
 index_number
       Current namelist is set to given index_number.

If no arguments are given, display all currently opened namelists.
"addtypes" is an alias for "namelist -a".
    </screen>
    <example id="ex.namelist">
      <title>namelist</title>
      <para>
	For a comprehensive example please refer to
	<xref linkend="sec.analyzekernelmodules">.
      </para>
      <screen>
>> namelist
INDEX  NAMELIST
=================================================
    0  /boot/Kerntypes
=================================================

The current namelist is /boot/Kerntypes (0)

>> namelist -a /tmp/snd.o
/tmp/snd.o is not an object file
The current namelist is /tmp/snd.o (1)

>> namelist
INDEX  NAMELIST
=================================================
    0  /boot/Kerntypes
    1  /tmp/snd.o
=================================================

The current namelist is /tmp/snd.o (1)

>> namelist 0
The current namelist is /boot/Kerntypes (0)
      </screen>
    </example>
  </section>

  <section id="sec.page">
    <title><command>page</command></title>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
page [-f] [-n] [-w outfile] [page_list]
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Display relevant information from the page struct for each entry in 
page_list. Entries in page_list can take the form of a page number 
(following a '#') or a virtual address of a page struct in memory. If no 
entries are specified, an entry for every page of physical memory will be 
displayed.
    </screen>
  </section>

  <section id="sec.print">
    <title><command>print</command></title>
    <bridgehead renderas="sect3">Aliases</bridgehead>
    <para><command>p</command>,<command>pb</command>,
      <command>pd</command>,<command>po</command>,<command>px</command></para>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
print [-d] [-o] [-x] [-b] [-w outfile] expression
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Evaluate an expression and print the result. An expression can consist of 
numeric values, operators, typedefs, struct/union members, symbols, or a 
combination of the above. Following are some examples of valid 
expressions:

    (((2*3+4/2)*2+(2/6))/2)

    ((struct task_struct *)0xc5c14000)->comm

    (*((struct task_struct *)0xc5c14000)->files.fd).f_flags & 0x8000

The pd command is the same as the print command except that it forces all 
integers to be displayed as decimal values.

The px command is the same as the print command except that it forces all 
integers to be displayed as hexadecimal values.

The po command is the same as the print command except that it forces all 
integers to be displayed as octal values.

The pb command is the same as the print command except that it forces all 
integer values to be displayed as binary values. Note that only single 
values (numbers, members of structures, etc.) will be displayed in binary 
form. Integer values in complex data types such as structures will be 
displayed as decimal values.
    </screen>
  </section>

  <section id="sec.quit">
    <title><command>quit</command></title>
    <bridgehead renderas="sect3">Aliases</bridgehead>
    <para><command>q</command>, <command>q!</command></para>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
quit 
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Exit lcrash.  Note that q will prompt for confirmation unless a '!' is 
appended to the command line.
    </screen>
    <example id="ex.quit">
      <title>quit</title>
      <screen>
>> q
Do you really want to quit (y to quit) ? n

>> q!
      </screen>
    </example>
  </section>

  <section id="sec.report">
    <title><command>report</command></title>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
report [-w outfile]
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Display a crash dump report. The report contains information about the 
system state when the kernel failure occurred.
    </screen>
  </section>


  <section id="sec.s390dbf">
    <title><command>s390dbf</command></title>
    <bridgehead renderas="sect3">Platform Dependency</bridgehead>
    <para>s390, s390x</para>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
s390dbf [-w outfile] [-v] [debug_log] [debug_log view]
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Display Debug logs:

+ If called without parameters, all active debug logs are listed.

+ If called with '-v', all debug views which are available to'lcrash' are 
listed.

+ If called with the name of a debug log, all debug-views for whichthe 
debug-log has registered are listed. It is possible thatsome of the debug 
views are not available to 'lcrash' (see '-v'option).

+ If called with the name of a debug-log and an available viewname,the 
specified view is printed.
    </screen>
  </section>

  <section id="sec.sizeof">
    <title><command>sizeof</command></title>
    <bridgehead renderas="sect3">Alias</bridgehead>
    <para><command>offset</command></para>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
sizeof 
        type | structure.field [...]
        -o structure.field [...]
        [-w outfile]
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Display size of data types in bytes. Additionally display offsets for
members of structs.

OPTIONS:
 type | structure.field [...]
       Print size of types (basic types, structs, typedefs) or
       member of structures in bytes.
 -o structure.field [...]
       Determine the member offset. Only arguments of the form
       'structure.field' are allowed.

To request size for multi-worded types (e.g. "short int") specify the
type whithin "".

Note: An alias "offset" exists for the calling sequence "sizeof -o".
    </screen>
    <example id="ex.sizeof">
      <title>sizeof</title>
      <screen>
>> sizeof task_struct module_ref int double
Size of "task_struct": 1152 bytes
Size of "module_ref": 12 bytes
Size of "int": 4 bytes
Size of "double": 8 bytes

>> sizeof mem_map_t page pgd_t
Size of "mem_map_t": 40 bytes
Size of "page": 40 bytes
Size of "pgd_t": 4 bytes

>> sizeof page.next mem_map_t.index thread_struct.trace -o
Offset: 0 bytes.
Offset: 8 bytes.
Offset: 100 bytes.

>> sizeof "long long unsigned int" "short int" "long double"
Size of "long long unsigned int": 8 bytes
Size of "short int": 2 bytes
Size of "long double": 12 bytes

>> sizeof "short unsigned int" mm_struct.count task_struct -o
ERROR: Could not determine offset for short unsigned int.
Offset: 16 bytes.
ERROR: Could not determine offset for task_struct.
      </screen>
    </example>
  </section>

  <section id="sec.stat">
    <title><command>stat</command></title>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
stat [-w outfile]
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Display system statistics and the log_buf array, which contains the 
latest messages printed via the kernel printf/cmn_err routines.
    </screen>
    <example id="ex.stat.s390">
      <title>stat (s390)</title>
      <screen>
>> stat

   sysname : Linux
  nodename : (none)
   release : 2.4.2-0tape-dasd
   version : #7 SMP Mon Apr 30 15:47:23 CEST 2001
   machine : s390
domainname : (none)

LOG_BUF:

    <4>Linux version 2.4.2-0tape-dasd (root@gfree16) (gcc version 2.95.2
 19991024 (release)) #7 SMP Mon Apr 30 15:47:23 CEST 2001
    <4>Command line is: root=/dev/dasda1 ro noinitrd dasd=3e04,3e05,3e00
 cio_msg=yes
    <4>
    <4>We are running native
    <4>This machine has an IEEE fpu
    <4>On node 0 totalpages: 24576
    <4>zone(0): 24576 pages.
    <4>zone(1): 0 pages.
    <4>zone(2): 0 pages.
    <4>Kernel command line: root=/dev/dasda1 ro noinitrd dasd=3e04,3e05,3e00
 cio_msg=yes
    <4>
 ...
      </screen>
    </example>
    <example id="ex.stat.i386">
      <title>stat (i386)</title>
      <screen>
>> stat

   sysname : Linux
  nodename : lion28
   release : 2.2.18
   version : #1 Wed Jan 24 12:28:55 GMT 2001
   machine : i686
domainname : 

LOG_BUF:

    <4>Linux version 2.2.18 (root@Pentium.suse.de) (gcc version 2.95.2 
19991024 (release)) #1 Wed Jan 24 12:28:55 GMT 2001
    <4>BIOS-provided physical RAM map:
    <4> BIOS-e820: 0009f000 @ 00000000 (usable)
    <4> BIOS-e820: 0fef0000 @ 00100000 (usable)
    <4>Detected 696981 kHz processor.
    <4>Console: colour VGA+ 80x25
    <4>Calibrating delay loop... 1389.36 BogoMIPS
    <4>Memory: 256508k/262080k available (1668k kernel code, 408k reserved,
 2968k data, 88k init, 0k bigmem)
...
      </screen>
    </example>
  </section>

  <section id="sec.strace">
    <title><command>strace</command></title>
    <bridgehead renderas="sect3">Platform Dependency</bridgehead>
    <para>Platform dependent usage and functionality.</para>
    <bridgehead renderas="sect3">Usage on i386</bridgehead>
    <screen>
strace [-a] [-l] [-f] [-w outfile] [pc sp] stack_addr [level]
    </screen>
    <bridgehead renderas="sect3">Description (i386)</bridgehead>
    <screen>
Displays all complete and unique stack traces (containing level or more 
stack frames) from the stack starting at stack_addr. If a level isn't 
specified, then each stack trace must have at least three frames to be 
considered valid. Alternately, use a specific PC and SP to generate a 
stack trace from the stack starting at stack_addr. Or, when the -l 
command line option is specified, displays a list of all saved return 
addresses contained in the stack starting at stack_addr, along with their 
location in the stack and possibly the name of the function called. Or, 
if the -a option is specified, display ALL traces of level or more 
frames, including invalid traces and duplicate (sub) traces.
    </screen>
    <bridgehead renderas="sect3">Usage on s390(x)</bridgehead>
    <screen>
strace [-f] [-w outfile] stack_addr [level]
    </screen>
    <bridgehead renderas="sect3">Description (s390)</bridgehead>
    <screen>
Displays all complete and unique stack traces (containing level or more 
stack frames) from the stack starting at stack_addr. If a level isn't 
Specified, then each stack trace must have at least three frames to be 
considered valid.
    </screen>
    <bridgehead renderas="sect3">Example (s390)</bridgehead>
    <example id="ex.strace.s390">
      <title>strace (s390)</title>
      <screen>
      <![CDATA[
>> task
    ADDR    UID    PID   PPID  STATE     FLAGS  NAME
===============================================================================
  184000      0      0      0      0         0  swapper
===============================================================================
1 active task struct found

>> whatis lowcore_ptr
    ADDR  OFFSET  TYPE         NAME
============================================================
  25c484       0  GLOBAL_DATA  lowcore_ptr

>> dump 25c484 10
0x25c484: 00000000 00000000 00000000 00000000 : ................
0x25c494: 00000000 00000000 00000000 00000000 : ................
0x25c4a4: 00000000 00000000                   : ........

>> dump 0x180 16
0x180: 00000000 000100e5 000100e5 00000001 : ................
0x190: 0042ce60 00010000 00000066 00000003 : .B.`.......f....
0x1a0: 00000394 000000e5 ffc4ea0a 0018cc80 : ................
0x1b0: 00000002 800b7f70 800b80ee 00185cd8 : .......p......\.

>> strace 00185cd8 
================================================================
TRACE FOR STACK PTR: 0x185cd8 

 0 disable_cpu_sync_isc+390 [0xb80ee]
 1 s390_device_recognition_irq+240 [0xb8f80]
 2 s390_device_recognition_all+42 [0xb8fc2]
 3 s390_init_IRQ+192 [0xb5fc0]
 4 init_IRQ+28 [0x1d50ac]
 5 start_kernel+322 [0x1d47d6]
 6 _stext+98 [0x10862]
 7 <back chain invalid>+<ERROR> [0x65bec0]
================================================================
      ]]>
      </screen>
    </example>
  </section>

  <section id="sec.symtab">
    <title><command>symtab</command></title>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
symtab 
        [-l [-f] [symtable]]
        [-r symtable]
        [-a symtable modulename]
        [-a symtable offset size]
        [-a symtable t_off d_off rd_off b_off t_len d_len rd_len b_len]
        [-w outfile]
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Add/remove/list symbol table information.

OPTIONS:
 -l [symtable]
       List information of (all) symbol table(s).
 -l -f [symtable]
       Show full list of symbols of (all) symbol table(s).
 -a symtable modulename
       Add new symbol table belonging to module modulename.
 -a symtable t_off d_off rd_off b_off t_len d_len rd_len b_len
       Add new symbol table using given segment offsets and lengths
       (off=offset, len=length, t=text, d=data, rd=rodata, b=bss).
 -a symtable offset size
       Add new symbol table using given offset and size.
       Regard size as size of object file corresponding to symtable.
 -r symtable
       Remove symbol table.
 -a __ksymtab__
 -r __ksymtab__
 -l [-f] __ksymtab__
       Add, remove or list table of exported kernel symbols.

You can use only one of the above command lines at the same time.
    </screen>
    <example id="ex.symtab">
      <title>symtab</title>
      <para>
	For a comprehensive example please refer to
	<xref linkend="sec.analyzekernelmodules">.
      </para>
    </example>
  </section>

  <section id="sec.task">
    <title><command>task</command></title>
    <bridgehead renderas="sect3">Alias</bridgehead>
    <para><command>ps</command></para>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
task [-f] [-n] [-w outfile] [task list]
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Display relevant information for each entry in task_list. If no entries 
are specified, display information for all active tasks. Entries in 
task_list can take the form of a virtual address or a PID (following a 
'#').
    </screen>
    <example id="ex.task">
      <title>task</title>
      <screen>
>> task
ACTIVE TASKS:

    ADDR    UID    PID   PPID  STATE     FLAGS  NAME
===============================================================================
c02ca000      0      0      0      0         0  swapper
cff3c000      0      1      0      1       100  init
cff28000      0      2      1      1        40  kflushd
cff26000      0      3      1      1        40  kupdate
cff24000      0      4      1      1       840  kswapd
cfd7a000      0      5      1      1        40  mdrecoveryd
cecea000      0    170      1      1       140  cardmgr
cc15c000      0    229      1      1       140  syslogd
cbfa6000      0    231      1      1       140  sshd
cc1b0000      0    234      1      1       140  klogd
cb9b6000      0    245      1      1       140  lpd
    ...
ca6b0000   4640   3306    433      1         0  xosview.bin
c9810000   4640   3309      1      1         0  xeyes
c02e0000   4640   3312      1      1         0  xclock
c5e6c000   4640   3314    433      1         0  FvwmPager
c657e000      0   3321    356      4        44  cron
===============================================================================
57 active task structs found

>> task -f c02e0000
    ADDR    UID    PID   PPID  STATE     FLAGS  NAME
===============================================================================
c02e0000   4640   3312      1      1         0  xclock

  MM:0xc97e7cc0

THREAD:
  ESP0:0xc02e2000, ESP:0xc02e1ea8, EIP:0xc0113286
  FS:0x0, GS:0x0

===============================================================================
1 active task struct found
      </screen>
    </example>
  </section>

  <section id="sec.trace">
    <title><command>trace</command></title>
    <bridgehead renderas="sect3">Alias</bridgehead>
    <para><command>t</command></para>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
trace [-a] [-f] [-w outfile] [[task_list] | [-t tracerec_list]
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Displays a stack trace for each task included in task_list. If task_list 
is empty and deftask is set, then a stack trace for the default task is 
displayed. If deftask is not set, then a trace will be displayed for the 
task running at the time of a system PANIC. If the command is issued with 
the -t command line option, additional items on the command line will be 
treated as pointers to lcrash stack trace records (prevously allocated 
using the mktrace command).
    </screen>
    <example id="ex.trace">
      <title>trace</title>
      <screen>
>> task
ACTIVE TASKS:

    ADDR    UID    PID   PPID  STATE     FLAGS  NAME
===============================================================================
  18e000      0      0      0      0         0  swapper
  5b0000      0      1      0      1       100  init
  5a8000      0      2      1      1        40  kmcheck
  59a000      0      3      1      1        40  keventd
  57c000      0      4      1      1       840  kswapd
  57a000      0      5      1      1       840  kreclaimd
  578000      0      6      1      1        40  bdflush
  576000      0      7      1      1        40  kupdated
 6edc000      0    231      3      1        40  keventd
 6ed0000      1    287      1      1       140  portmap
 6e60000      0    349      1      1        40  syslogd
 779a000      0    363      1      1       140  klogd
 6d54000      0    401      1      1       140  inetd
 6a0a000    100    448      1      1        40  xfs
 7ac0000      0    467      1      1         0  sulogin
 6948000      0    468    401      1       100  in.telnetd
 68f8000      0    469    468      1       100  login
 67e4000      0    470    469      1       100  bash
 61c8000      0    534    470      0       100  lcrash
===============================================================================
19 active task structs found

>> trace 67e4000
================================================================
STACK TRACE FOR TASK: 0x67e4000 (bash)

 STACK:
 0 schedule+1076 [0x1c590]
 1 sys_wait4+1050 [0x23fc6]
 2 pgm_system_call+34 [0x130d0]
================================================================

>> trace 67e4000 -f
================================================================
STACK TRACE FOR TASK: 0x67e4000 (bash)

 STACK:
 0 schedule+1076 [0x1c590]

   SP=0x67e5de8, FP=0x67e5e48, SIZE=144

   67e5de8: 067e5e78  00525164  077e4000  077e4000  
   67e5df8: 067e5ea8  07000000  067e4000  00000001  
   67e5e08: 005bc000  067e4000  00000000  067e5de8  
   67e5e18: 00525120  8001c164  8001c590  067e5de8  
   67e5e28: 00525120  067e5f68  00000004  070de000  
   67e5e38: 00479000  067e4000  0052513c  80011038  
   67e5e48: 070112cc  077e5e10  0401d000  0690a000  
   67e5e58: 067e5f68  00000001  00000000  00000000  
   67e5e68: 00000000  067e5e6c  001ea030  00000004  

 1 sys_wait4+1050 [0x23fc6]

   SP=0x67e5e78, FP=0x67e5ed8, SIZE=144

   67e5e78: 067e5f08  800f8da0  067e5f08  067e5e48  
   67e5e88: 067e5e6c  00000215  00000002  001ea010  
   67e5e98: 7ffff7fc  00000000  ffffffff  fffffe00  
   67e5ea8: 00000000  80023bb4  80023fc6  067e5e78  
   67e5eb8: ffffffea  00000020  0048a668  067e4000  
   67e5ec8: 00000000  000000ff  7ffff6c8  06df1ae0  
   67e5ed8: 00000000  067e4000  067e40b0  067e40b0  
   67e5ee8: 00000000  067e4000  00000000  00000000  
   67e5ef8: 067e4000  00000000  7ffff800  067e4000  

 2 pgm_system_call+34 [0x130d0]

   SP=0x67e5f08, FP=0x67e5f68, SIZE=248

   67e5f08: 00000000  00000000  00000000  00000000  
   67e5f18: 00000000  00000000  0048a668  00402c0c  
   67e5f28: 00023bac  067e4000  00422e74  7ffff798  
   67e5f38: c015f2d4  00013000  800130d0  067e5f08  
   67e5f48: 00000000  00000000  00000000  00000000  
   67e5f58: 00000000  00000000  00000000  00000000  
   67e5f68: 070dd000  c00e357a  00000000  400e3578  
   67e5f78: ffffffff  7ffff7fc  00000002  00000000  
   67e5f88: 0048a668  00402c0c  00000001  00000000  
   67e5f98: 00422e74  7ffff798  c015f2d4  c00e3504  
   67e5fa8: c00e352a  7ffff738  00000000  00000000  
   67e5fb8: 00000000  00000000  00000001  00000000  
   67e5fc8: 00000000  00000000  00000000  00000000  
   67e5fd8: 00000000  00000000  00000000  00000000  
   67e5fe8: 00000000  00000000  ffffffff  00000020  
   67e5ff8: 01ffffff  00000000  

================================================================

>> trace 61c8000
================================================================
TASK HAS CPU (1): 0x61c8000 (lcrash):
No valid lowcore info available ?
 LOWCORE INFO:
  -psw      : 0x07080000 0x8001b0de
  -function : do_machine_power_off+142
  -prefix   : 0x005bf000
  -cpu timer: 0xffff879f 0x5a597b00
  -clock cmp: 0xb5eabdb9 0x7a80ea00
  -general registers:
     00190654 00000000 00000000 00000000
     0026350c 00000009 00000004 00000001
     0002cab8 04674000 00400af0 04674000
     04674000 8001b058 8001b080 04675ce8
  -access registers:
     00000000 00000000 00000000 00000000
     00000001 00000000 00000000 00000000
     00000000 00000000 00000000 00000000
     00000000 00000000 00000000 00000000
  -control registers:
     14b52a02 0026107f 00000000 00000000
     00000000 00000000 11000000 846661ff
     00000000 00000000 00000000 00000000
     00000000 846661ff d0000000 00000000
  -floating point registers 0,2,4,6:
     0000000000000000 0000000000000000
     0000000000000000 0000000000000000

================================================================
      </screen>
    </example>
  </section>

  <section id="sec.unload">
    <title><command>unload</command></title>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
unload filename|directory
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Unload a file or a directory. In the case of a directory, all files in 
that directory will be unloaded.
    </screen>
  </section>

  <section id="sec.vi">
    <title><command>vi</command></title>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
vi function_name | -f sial_file_name
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Start a vi session of a sial file or a sial function in particular.
    </screen>
  </section>

  <section id="sec.vtop">
    <title><command>vtop</command></title>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
vtop [-m map_pointer] [-w outfile] vaddr_list
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Display the virtual to physical memory mapping for each entry in 
vaddr_list. Entries in addr_list can in the form of a physical address, 
virtual address, or page number (following a '#'). When the -m command 
line option is specified, treat the accompanying parameter as an 
mm_struct pointer to use when determining memory mapping.
    </screen>
    <example id="ex.vtop.1">
      <title>vtop</title>
      <screen>
>> dump 0xd002cfe0 -B 60
0xd002cfe0: 73 6e 64 5f 70 63 69 5f 63 6f 6d 70 61 74 5f 66 : snd_pci_compat_f
0xd002cff0: 69 6e 64 5f 63 61 70 61 62 69 6c 69 74 79 00 73 : ind_capability.s
0xd002d000: 6e 64 5f 70 63 69 5f 63 6f 6d 70 61 74 5f 64 6d : nd_pci_compat_dm
0xd002d010: 61 5f 73 75 70 70 6f 72 74 65 64 00             : a_supported.

>> vtop 0xd002cfe0
   VADDR     KADDR     PADDR       PFN
==============================================================
d002cfe0  cef42fe0   ef42fe0     61250
==============================================================

>> dump ef42fe0 -B 60
0xef42fe0: 73 6e 64 5f 70 63 69 5f 63 6f 6d 70 61 74 5f 66 : snd_pci_compat_f
0xef42ff0: 69 6e 64 5f 63 61 70 61 62 69 6c 69 74 79 00 73 : ind_capability.s
0xef43000: c4 20 83 c4 fc 6a 01 68 73 c8 02 d0 53 e8 a6 fe : . ...j.hs...S...
0xef43010: ff ff 83 c4 fc 6a 02 68 81 c8 02 d0             : .....j.h....

>> vtop 0xd002d000
   VADDR     KADDR     PADDR       PFN
==============================================================
d002d000  cef41000   ef41000     61249
==============================================================

>> dump ef41000 -B 28
0xef41000: 6e 64 5f 70 63 69 5f 63 6f 6d 70 61 74 5f 64 6d : nd_pci_compat_dm
0xef41010: 61 5f 73 75 70 70 6f 72 74 65 64 00             : a_supported.
      </screen>
    </example>
    <example id="ex.vtop.2">
      <title>vtop</title>
      <screen>
>> whatis init_mm
    ADDR  OFFSET  TYPE         NAME
============================================================
c02a90a0       0  GLOBAL_DATA  init_mm

>> whatis module_list
    ADDR  OFFSET  TYPE         NAME
============================================================
c02ad128       0  GLOBAL_DATA  module_list

>> dump c02ad128
0xc02ad128: d0103000                            : .0..

>> vtop -m c02a90a0 d0103000
   VADDR     KADDR     PADDR       PFN
==============================================================
d0103000  cec99000   ec99000     60569
==============================================================

>> print ((module*)0xec99000)->name
0xd0106a26

>> vtop -m c02a90a0 0xd0106a26
   VADDR     KADDR     PADDR       PFN
==============================================================
d0106a26  cec96a26   ec96a26     60566
==============================================================

>> print (char*) ec96a26
0xec96a26 "ibmtr_cs"
      </screen>
    </example>
  </section>

  <section id="sec.walk">
    <title><command>walk</command></title>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
walk 
        [-l]
        struct field|offset addr [-f] [-n] [-h n|p]
        struct field|offset addr -s [-h n|p]
        struct field|offset addr -h n|p -t
        address offset size
        [-i iteration_threshold]
        [-w outfile]
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Walk a linked list of kernel structures or memory blocks.

OPTIONS:
 -l
       Show a list of special structures, which can be displayed in a
       predefined formatted manner.
       Currently there is support for a handful special structures.
 struct field|offset addr [-f] [-n] [-h n|p]
       Display  each entry of a linked list of special structures in
       a predefined formatted way.
       By default, the output consists of one line for each structure.
       Using '-f' and/or '-n' a more detailed output is given.
       '-f' can be used for all special structures. '-n' works for
       special structures "mm_struct" and "task_struct".
 struct field|offset addr -s [-h n|p]
       Each structure of a linked list is displayed in its entirety -
       in a C-like format. All structures for which type information is
       available can be displayed in this manner.
 -h n|p
       A linked list is constructed by following "list_head" structures
       instead of next pointers. The argument specifies wether to follow
       the next pointers of struct list_head (using 'n') or to follow
       the prev pointers of struct list_head (by using 'p').
       'field' or 'offset' is regarded as a member of type "list_head"
       instead of a next pointer within the 'struct'. 'addr' is
       interpreted as a pointer to an anchor of a linked list of
       "struct list_head" structures.
 struct field|offset addr -h n|p -t
       Display each entry of a linked "list_head"-list in one line.
       For each entry the address to the 'struct' structure, the
       address to the "list_head" member within 'struct', and previous
       and next pointer of the embedded "list_head" are given.
 address offset size
       Do a hex memory dump of each structure in a list.
       A start address ('address') of a structure, a byte offset
       ('offset') for the next pointer in the structure, and a
       structure size ('size') are required. 'size' bytes will be
       dumped for each entry in the constructed list.
 -i iteration_threshold
       By default, certain loops are interrupted after 10'000 iterations
       to avoid endless loops while following invalid pointers. Using
       this option you can change the threshold for the current command.
       A value '0' means infinite iteration threshold, i.e. no
       interruption of the loop is caused by reaching any threshold.

While using "struct field|offset addr" without '-h', a structure name
('struct'), a field name ('field') or byte offset ('offset') for the next
pointer within the structure, and a pointer ('addr') to the first entry
of the linked list must be given.

Note: Using '-h' the anchor is not displayed as a structure 'struct'.
    </screen>
    <example id="ex.walk.1">
      <title>walk</title>
      <screen>
>> module
    ADDR      SIZE USED NAME                               REFS 
===========================================================================
d0103000     17928    1 ibmtr_cs                      []
d00fe000      6608    2 ds                            [ibmtr_cs]
d00f3000     23408    2 i82365                        []
d00e6000     46848    0 pcmcia_core                   [ibmtr_cs
                                                       ds
                                                       i82365]
c02ad0e0         0    1 kernel_module                 []
===========================================================================

>> print ((module*) d00e6000)->refs
0xd0106b80

>> walk -s module_ref next_ref 0xd0106b80
struct module_ref {
        dep = 0xd00e6000
        ref = 0xd0103000
        next_ref = 0xd00ff9bc
}
struct module_ref {
        dep = 0xd00e6000
        ref = 0xd00fe000
        next_ref = 0xd00f8b38
}
struct module_ref {
        dep = 0xd00e6000
        ref = 0xd00f3000
        next_ref = (nil)
}
      </screen>
    </example>
    <example id="ex.walk.2">
      <title>walk</title>
      <screen>
>> findsym inode_unused
      ADDR  OFFSET  TYPE         NAME
============================================================
0xc0243e48       0  LOCAL_DATA   inode_unused
============================================================
1 symbol found

>> walk list_head next 0xc0243e48 -h n -t
STRUCT ADDR       PREV   LISTHEAD       NEXT
============================================
          0 0xc2faca48 0xc0243e48 0xc4d8d340
 0xc4d8d340 0xc0243e48 0xc4d8d340 0xc416ef68
 0xc416ef68 0xc4d8d340 0xc416ef68 0xc7ab55d0
 0xc7ab55d0 0xc416ef68 0xc7ab55d0 0xc3244298
 0xc3244298 0xc7ab55d0 0xc3244298 0xc328c3e0
 0xc328c3e0 0xc3244298 0xc328c3e0 0xc3baf0b0
   ...
 0xc32767b8 0xc3276cd8 0xc32767b8 0xc7ab50b0
 0xc7ab50b0 0xc32767b8 0xc7ab50b0 0xc79e7af0
 0xc79e7af0 0xc7ab50b0 0xc79e7af0 0xc3289af0
 0xc3289af0 0xc79e7af0 0xc3289af0 0xc32623e0
 0xc32623e0 0xc3289af0 0xc32623e0 0xc31f2150
 0xc31f2150 0xc32623e0 0xc31f2150 0xc314b0b0
 0xc314b0b0 0xc31f2150 0xc314b0b0 0xc2ff3c38
 0xc2ff3c38 0xc314b0b0 0xc2ff3c38 0xc2fd2528
 0xc2fd2528 0xc2ff3c38 0xc2fd2528 0xc2faca48
 0xc2faca48 0xc2fd2528 0xc2faca48 0xc0243e48
============================================

>> walk inode i_list 0xc0243e48 -h n -t
STRUCT ADDR       PREV   LISTHEAD       NEXT
============================================
          0 0xc2faca48 0xc0243e48 0xc4d8d340
 0xc4d8d338 0xc0243e48 0xc4d8d340 0xc416ef68
 0xc416ef60 0xc4d8d340 0xc416ef68 0xc7ab55d0
 0xc7ab55c8 0xc416ef68 0xc7ab55d0 0xc3244298
 0xc3244290 0xc7ab55d0 0xc3244298 0xc328c3e0
 0xc328c3d8 0xc3244298 0xc328c3e0 0xc3baf0b0
   ...
 0xc32767b0 0xc3276cd8 0xc32767b8 0xc7ab50b0
 0xc7ab50a8 0xc32767b8 0xc7ab50b0 0xc79e7af0
 0xc79e7ae8 0xc7ab50b0 0xc79e7af0 0xc3289af0
 0xc3289ae8 0xc79e7af0 0xc3289af0 0xc32623e0
 0xc32623d8 0xc3289af0 0xc32623e0 0xc31f2150
 0xc31f2148 0xc32623e0 0xc31f2150 0xc314b0b0
 0xc314b0a8 0xc31f2150 0xc314b0b0 0xc2ff3c38
 0xc2ff3c30 0xc314b0b0 0xc2ff3c38 0xc2fd2528
 0xc2fd2520 0xc2ff3c38 0xc2fd2528 0xc2faca48
 0xc2faca40 0xc2fd2528 0xc2faca48 0xc0243e48
============================================

>> findsym inode_in_use
      ADDR  OFFSET  TYPE         NAME
============================================================
0xc0243e40       0  GLOBAL_DATA  inode_in_use
============================================================
1 symbol found

>> walk inode i_list 0xc0243e40 -h n -t -i 5
STRUCT ADDR       PREV   LISTHEAD       NEXT
============================================
          0 0xcff38008 0xc0243e40 0xc5501c38

WARNING: Previous pointer broken. PREV: 0xc579c3e0, SHOULD BE: 0xc0243e40
 0xc5501c30 0xc579c3e0 0xc5501c38 0xc6314f68
 0xc6314f60 0xc5501c38 0xc6314f68 0xc2c44e20
 0xc2c44e18 0xc6314f68 0xc2c44e20 0xc8671340
 0xc8671338 0xc2c44e20 0xc8671340 0xc54da528
 0xc54da520 0xc8671340 0xc54da528 0xcbde6528

WARNING: Iteration threshold reached. Current threshold: 5.
         Use "-i" to change threshold.
      </screen>
    </example>
    <example id="ex.walk.3">
      <title>walk</title>
      <screen>
>> module
      ADDR      SIZE USED NAME                          REFS 
===========================================================================
0xd00f6000     17928    1 ibmtr_cs                      []
0xd00f1000      6608    2 ds                            [ibmtr_cs]
0xd00e6000     23408    2 i82365                        []
   ...
0xd002b000     27168    0 snd-ac97-codec                [snd-cs461x]
0xd0023000     28624    0 snd-mixer                     [snd-ac97-codec]
0xd0017000     43632    1 snd                           [snd-seq-midi
                                                         snd-seq-midi-event
                                                         snd-seq
                                                         snd-card-cs461x
                                                         snd-cs461x
                                                         snd-pcm
                                                         snd-timer
                                                         snd-rawmidi
                                                         snd-seq-device
                                                         snd-ac97-codec
                                                         snd-mixer]
0xd0015000      2576    2 soundcore                     [snd]
0xc0241980         0    1 kernel_module                 []
===========================================================================

>> sizeof module
Size of "module": 72 bytes

>> offset module.next
Offset: 4 bytes.

>> walk 0xd002b000 4 72
Dumping 72 byte block at 0xd002b000:

0xd002b000: 00000060 d0023000 d00314c9 00006a20 : `....0...... j..
0xd002b010: 00000000 00000011 0000000a 00000002 : ................
0xd002b020: d00315a0 d0031a08 d0058134 d0030350 : ........4...P...
0xd002b030: d003035c 00000000 00000000 00000000 : \...............
0xd002b040: 00000000 00000000                   : ........

Dumping 72 byte block at 0xd0023000:

0xd0023000: 00000060 d0017000 d0029cc1 00006fd0 : `....p.......o..
0xd0023010: 00000000 00000019 00000035 00000001 : ........5.......
0xd0023020: d0029d78 d0029fc4 d0031a08 d00266b4 : x............f..
0xd0023030: d00266c0 d00296e0 d00297e8 00000000 : .f..............
0xd0023040: 00000000 00000000                   : ........

Dumping 72 byte block at 0xd0017000:

0xd0017000: 00000060 d0015000 d00200c1 0000aa70 : `....P......p...
0xd0017010: 00000001 00000019 0000005f 00000001 : ........_.......
0xd0017020: d0020170 d0021a60 d0080fd0 d0017ba4 : p...`........{..
0xd0017030: d0017bb0 d001f8a4 d001f8fc 00000000 : .{..............
0xd0017040: 00000000 00000000                   : ........

Dumping 72 byte block at 0xd0015000:

0xd0015000: 00000060 c0241980 d0015825 00000a10 : `.....$.%X......
0xd0015010: 00000002 00000019 00000010 00000000 : ................
0xd0015020: d00158f8 00000000 d0021a60 d001545c : .X......`...\T..
0xd0015030: d0015440 00000000 00000000 00000000 : @T..............
0xd0015040: 00000000 00000000                   : ........

Dumping 72 byte block at 0xc0241980:

0xc0241980: 00000048 00000000 c0205380 00000000 : H........S .....
0xc0241990: 00000001 00000001 00000339 00000000 : ........9.......
0xc02419a0: c0233958 00000000 00000000 00000000 : X9#.............
0xc02419b0: 00000000 c0232aa0 c0233958 00000000 : .....*#.X9#.....
0xc02419c0: 00000000 00000000                   : ........

5 blocks in linked list
      </screen>
    </example>
  </section>

  <section id="sec.whatis">
    <title><command>whatis</command></title>
    <bridgehead renderas="sect3">Usage</bridgehead>
    <screen>
whatis [-a] [-f] [-l] [-n] [-w outfile] expression
    </screen>
    <bridgehead renderas="sect3">Description</bridgehead>
    <screen>
Display, in C-like fashion, detailed information about kernel types 
(structs, unions, typedefs, base types, etc.) If the -a option is 
specified, display a list of all types. If the -l option is specified, 
display type information in tabular form. When the -f option is 
specified, along with the -l option, display additional information about 
the type. If the -n option is specified for a struct or union, along with 
the -l option, display information about each member.
    </screen>
    <bridgehead renderas="sect3">Note</bridgehead>
    <para>For display of information for multi-worded types
      (e.g. "short int") you have to use parenthesis around the type.
    </para>
    <example id="ex.whatis">
      <title>whatis</title>
      <screen>
>> whatis mem_map
    ADDR  OFFSET  TYPE         NAME
============================================================
c02addec       0  GLOBAL_DATA  mem_map

>> whatis (short unsigned int) -l
NAME                      TYPE             TYPE_NUM         REAL_TYPE  SIZE
===============================================================================
short unsigned int        BASE     0001000000000009  0000000000000000    2
===============================================================================
1 type found

>> whatis page
struct page {
        struct page *next;
        struct page *prev;
        pgoff_t index;
        struct inode *inode;
        struct page *next_hash;
        atomic_t count;
        long unsigned int flags;
        struct wait_queue *wait;
        struct page **pprev_hash;
        struct buffer_head *buffers;
};

>> whatis page.index
pgoff_t

>> whatis pgoff_t 
long unsigned int 

>> whatis page -l
NAME                      TYPE             TYPE_NUM         REAL_TYPE  SIZE
===============================================================================
page                      STRUCT   0001002300000014  0000000000000000   40
===============================================================================
1 type found

>> whatis page.index -l -f
NAME                      TYPE             TYPE_NUM         REAL_TYPE  SIZE
===============================================================================
long unsigned int         BASE     0001000000000005  0000000000000000    4
  ST_BIT_OFFSET=0, ST_BIT_SIZE=0
  ELEMENT_TYPE=0x0, INDEX_TYPE=0x1000000000005, VALUE=0
  FLAGS=0x2, OFFSET=0
  TYPESTR="long unsigned int "
  LOW_BOUNDS=0, HIGH_BOUNDS=-1, MEMBER=0x0, NEXT=0x0

===============================================================================
1 type found

>> whatis -a -l
FileVersion               TYPEDEF  0001004e00000007  0001000900000017    0
PioctlData                STRUCT   0001004e00000049  0000000000000000   20
Unique_t                  TYPEDEF  0001004e00000006  0001000900000017    0
...
loff_t                    TYPEDEF  000100090000000d  0001000c00000013    0
long double               BASE     000100000000000e  0000000000000000   12
long int                  BASE     0001000000000003  0000000000000000    4
long long int             BASE     0001000000000006  0000000000000000    8
long long unsigned int    BASE     0001000000000007  0000000000000000    8
long unsigned int         BASE     0001000000000005  0000000000000000    4
machine_type              ENUM     0001004900000001  0000000000000000    0
mem_map_t                 TYPEDEF  0001000200000016  0001002300000014    0
...
task_struct               STRUCT   0001002500000002  0000000000000000 1424
task_union                UNION    0001000300000014  0000000000000000 8192
tcflag_t                  TYPEDEF  0001007b00000003  0001000000000004    0
termio                    STRUCT   0001007a00000002  0000000000000000   18
...
void                      BASE     0001000000000013  0001000000000013   -1
vuid_t                    TYPEDEF  0001004e0000000a  0001000900000020    0
wait_queue                STRUCT   0001001c00000003  0000000000000000   12
wait_queue_head_t         TYPEDEF  0001002500000004  0001001c00000002    0
wait_queue_t              TYPEDEF  0001002500000003  0001001c00000003    0
winsize                   STRUCT   0001007a00000001  0000000000000000    8
===============================================================================
491 types found
      </screen>
    </example>
  </section>

</chapter>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-always-quote-attributes:t
sgml-auto-insert-required-elements:t
sgml-balanced-tag-edit:t
sgml-exposed-tags:nil
sgml-general-insert-case:lower
sgml-indent-data:t
sgml-indent-step:2
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
sgml-minimize-attributes:nil
sgml-namecase-general:t
sgml-omittag:t
sgml-parent-document:("lcrash.sgml" "book" "chapter")
sgml-shorttag:t
sgml-tag-region-if-active:t
End:
-->
