Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tb — Apollo

Media Vault

Software Library

Restoration Projects

Artifacts Sought

9.5;tb (traceback), revision 9.5, 87/05/13
TB (TRACEBACK) -- Print traceback after a fault.
usage:  tb [process_name | process_uid | unix_pid] [options]


FORMAT

  TB [process_id] [options]


  TB  prints  a  traceback  after a fault.  The traceback lists the names of the
  routines leading from the fault back to the main  program,  and  includes  the
  line  number  at  which each routine was called.  Up to 32 levels of calls can
  appear.  If the sequence exceeds 32 calls, the first 16 and last 16 are  shown
  in the traceback.

  NOTE: There  is  a  homonymous  DM  command: TB -- To bottom of window.   Type
        HELP TB_DM for details about that command.


ARGUMENTS

  process_id
  (optional)         Specify the ID of the process for which  the  traceback  is
                     desired. This may be the process name (displayed by the PST
                     (PROCESS_STATUS) command), the process UID, or the UNIX PID
                     (from PST -UN).

                     Default if omitted:  perform traceback for the current
                                          process.


OPTIONS

  The  following  options  are  meaningful  only  when  used  for  cross-process
  tracebacks (i.e., tracing faults in some  processes  other  than  the  current
  one).

  -ARGS                Print  the  arguments  to  each  call  mentioned  in  the
                     traceback.  NOTE: At SR9.5, this option functions only  for
                     Pascal  and FORTRAN calls. It does not report arguments for
                     C calls.

  -A[LL_FRAMES]
                     Print  all  frames  back  to  the  root of the stack (i.e.,
                     through the  current  program  and  any  calling  programs)
                     rather than stopping at the current program level.

  -R[EPEAT] [n]
                     Repeat the traceback every 'n' seconds.    Repeat  every  5
                     seconds if 'n' is omitted.

  -T[ASK]             Perform  traceback  for  all  the  tasks  running  in  the
                     specified process.


EXAMPLES

     1. In  the  following  example,  an  overflow  error  occurred  in   a
        floating-point  multiplication  at  line  25  of  the routine named
        EXTRAPOLATE.  The routine EXTRAPOLATE was called at line 192 of the
        routine REFLECTION, which in turn was called at line 19 of the main
        program.

            $ tb
            overflow in multiply (from library/floating point)
            In routine "EXTRAPOLATE" line 25
            Called from "REFLECTION" line 192
            Called from "$MAIN" line 19
            $

     2. Trace a fault in the process named 'mail', showing call arguments.

        $ tb mail -args
        In System Service "ec2_$wait"
           Arguments unavailable
        Called from "INPAD_$GET" line 152
            1. 00938A66 -> 00938ABC  ....
            2. 00A53A1C -> 00000000  ....
            3. 00987664 -> 20750A2D   u.-
            4. 000125B0 -> 000003E8  ....
            5. 0003907C -> 00000000  ....
        Called from "STREAM_$GET_REC" line 149
            1. 00987AA0 -> 00000001  ....
            2. 00987650 -> 00987664  ..vd
            3. 000125B0 -> 000003E8  ....
            4. 00987A4C -> 00987A70  ..zp
            5. 00987A50 -> 000390E8  ....
            6. 00987A54 -> 00987638  ..v8
            7. 0003907C -> 00000000  ....
        Called from "GET_COMMAND" line 1754
            1. 00987AA0 -> 00000001  ....
            2. 00987AA2 -> 00010002  ....
            3. 00039010 -> 3A000000  :...
            4. 000397DA -> 00010000  ....
            5. 000390E8 -> 0092576E  ..Wn
            6. 0003907C -> 00000000  ....
        Called from "EXEC_STREAM" line 2413
            1.     0000
            2.     0001
            3.     0002
            4.     0003
            5. 0003907C -> 00000000  ....
        Called from "MAIL" line 3146
           Arguments unavailable
        $

     3. Trace a fault in the process named 'mail' as far down the stack  as
        possible.

        $ tb mail -a
        In System Service "ec2_$wait"
        Called from "INPAD_$GET" line 152
        Called from "STREAM_$GET_REC" line 149
        Called from "GET_COMMAND" line 1754
        Called from "EXEC_STREAM" line 2413
        Called from "MAIL" line 3146
        Called from "<Invoke Interlude>"
        Called from "PGM_$LOAD_RUN" line 451
        Called from "PGM_$INVOKE_UID_S" line 634
        Called from "PGM_$INVOKE_UID" line 214
        Called from "PM_$INIT" line 725
        $

     4. Trace a fault in a process that is running tasks.

        $ tb process_21 -task
        "distinguished_task"
        (waiting)
        In "STACK FILE" offset 469A0
        Called from "task_$ec2_wait" line 1172
        Called from "EC2_$WAIT_SVC" line 156
        Called from "EC2_$WAIT" line 169
        Called from "MAIN" line 179
        Called from "SERVER" line 10
        "reaper_task"
        (active)
        In System Service "ec2_$wait"
        Called from "task_$ec2_wait" line 1172
        Called from "EC2_$WAIT_SVC" line 156
        Called from "EC2_$WAIT" line 169
        Called from "task_$reaper_task" line 1986
        Called from "task_$base_proc" line 675
        Called from "/sys/node_data/global_readonly" offset 36F06
        "TaskA1"
        (waiting)
        In "STACK FILE" offset 9A528
        Called from "task_$ec2_wait" line 1172
        Called from "EC2_$WAIT_SVC" line 156
        Called from "EC2_$WAIT" line 169
        Called from "GLARK" line 65
        Called from "task_$base_proc" line 675
        Called from "/sys/node_data/global_readonly" offset 36F06
        "TaskB22"
        (waiting)
        In "STACK FILE" offset 9CD90
        Called from "task_$ec2_wait" line 1172
        Called from "EC2_$WAIT_SVC" line 156
        Called from "EC2_$WAIT" line 169
        Called from "GLARK" line 65
        Called from "task_$base_proc" line 675
        Called from "/sys/node_data/global_readonly" offset 36F06
        "TaskC333"
        (waiting)
        In "STACK FILE" offset 9F5FC
        Called from "task_$ec2_wait" line 1172
        Called from "EC2_$WAIT_SVC" line 156
        Called from "EC2_$WAIT" line 169
        Called from "GLARK" line 65
        Called from "task_$base_proc" line 675
        Called from "/sys/node_data/global_readonly" offset 36F06
        $

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026