Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

;
SOURCE -- Specify the source code file to display (for use with -src, -src_r,
          and -src_t options only).


FORMAT
                         |------------
                         | pathname
  SOurce  compiled-file  |------------
                         | -NONE
                         |------------

    The SOURCE command can be abbreviated as SO or SRC.


REQUIRED ARGUMENTS

  None.            If you specify SOURCE with no arguments, DEBUG displays the
                   name of the current source file.


OPTIONAL ARGUMENTS

  compiled-file    the name of a target program source file at the time it was
                   compiled.  You may enter either a full pathname or a
                   partial pathname which is unique within your program name.
                   (A leafname is usually all that DEBUG requires.)

  pathname         the pathname of a file or a directory.

  -NONE            a keyword that tells the debugger that no source file is
                   available for the given or implied compiled-file.


DESCRIPTION

  Most of the time, DEBUG can figure out the correct source code to display.
  However, in some cases, DEBUG picks incorrectly. The main use of the SOURCE
  command is to pick the right source code to display when DEBUG cannot figure
  it out.  In fact, you can use the SOURCE command to display any source code
  you desire (even source code from another program).

  SOURCE can take zero, one, or two arguments.  With no arguments, the command
  shows the name of the current source file. If the file used for source
  display is different from the originally compiled file both file names are
  shown.  (Note that specifying SOURCE with no arguments produces results even
  if you did not specify -SRC when you invoked DEBUG.)

  With one or two arguments, the interpretation of the command depends on
  whether compiled-file is present and on whether pathname resolves to a file
  or to a directory.  There are five cases.


Case 1: Compiled-file is Present, Pathname is a File

  If you specify both a pathname and a compiled-file, and if pathname resolves
  to a filename, then pathname specifies the file to be used for displaying
  source for the given compiled-file.  For example, the following command
  tells DEBUG to use file old_util.pas (in the working directory) for source
  display of the file whose leaf name was util.pas when it was compiled:

     > SOURCE  util.pas  old_util.pas


Case 2: Compiled-file is not Present, Pathname is a File

  If you specify a pathname which resolves to a file, and you do not specify
  a compiled-file, then DEBUG displays the file stored at the pathname. For
  example, the following command causes DEBUG to display the contents of file
  old_util.pas stored in the working directory.

     > SOURCE  old_util.pas

  This command works even if you compiled old_util.pas with -DB instead of
  -DBA or -DBS.  However, if does not work if you compiled with -NDB.

  DEBUG records the association between the current routine and this source
  code; therefore, if you return to this routine, DEBUG will redisplay this
  source code.

  If the current environement shifts from a routine with no symbol table to
  another routine with no symbol table, DEBUG assumes that the two routines
  are in the same source file.  If this is not the case enter another SOURCE
  command to specify the correct file.


Case 3: Compiled-file is Present, Pathname is a Directory

  If you specify both a pathname and a compiled-file, and if the pathname
  resolves to a directory, then the command is equivalent to

     > SOURCE compiled-file pathname/compiled-file

  For example, the following two commands are equivalent:

     > SOURCE util.pas archives
     > SOURCE util.pas archives/util.pas


Case 4: Compiled-file is not Present, Pathname is a directory

  If you only specify one argument -- a directory -- then pathname is added to
  the list of alternate directories to be searched for all source files.  For
  example, suppose that directory archives is directly underneath the working
  directory.  By issuing the following command

     > SOURCE archives

  we ensure that DEBUG will search .archives if it cannot find the source code
  in the working directory.


Case 5: The -NONE option

  The -NONE option used in place of a pathname specifies that no source file
  is available for the given or implied compiled-file.  This is useful when
  the debugger displays the wrong source file and the right one is not
  available.  DEBUG will leave the source display pane blank.

  For full details, see Chapter 3 of the DOMAIN Language Level Debugger
  Reference manual.

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