DIS(1)DIS(1)


NAME
     dis - Disassemble an object file

SYNOPSIS
     dis [options ] file

DESCRIPTION
     dis disassembles object files into machine instructions.  The
     following options are accepted:

     -b beginaddress
                 Disassemble starting at the given address.  The address
                 can be in decimal, octal (with a leading 0), or
                 hexadecimal (with a leading 0x).

     -d section  Disassemble the named section as data, printing the offset
                 from the beginning of the section.

     -C          Demangle C++ names.

     -D section  Disassemble the named section as data, printing the actual
                 address of the data.

     -e endaddress
                 Disassembly stops at the given address.  The address can
                 be in decimal, octal (with a leading 0), or hexadecimal
                 (with a leading 0x).

     -F function or -p function
                 Disassemble the named function only in each object file
                 specified on the command line.  This option may be
                 specified multiple times on the command line.

     -f          Prefixes the line number on disassembly lines with the
                 source file basename.

     -h          Substitute the general register names for the software
                 register names in the output.

     -H          Remove the leading source line, leaving hex value and the
                 instructions.

     -i          Remove the leading source line and hexadecimal value of
                 disassembly, leaving only the instructions.

     -I directory
                 Use the directory to help find the source code.

     -l string   Disassemble the archive file specified by string.  For
                 example, dis -l x would add usr/lib/libx.a to the files to
                 be disassembled.

     -L          Look up source labels for subsequent printing.  This
                 option works only if the file was compiled with debugging
                 information.

     -o          Print addresses and contents in octal.  The default is
                 hexadecimal.

     -pixie      For pixie(1)d files, display original and pixified
                 instructions intermixed with source.  This is the default
                 with pixified files, so this option obsolete and will
                 eventually be removed.

     -s          Attempts to print j, jal target names.  Not relevant
                 because with PIC code j, jal are little used.  This is the
                 default unless the -svr4 option is specified.

     -svr4       Print using svr4 output format.  This means (if no other
                 options given) no externals are named (when loading data
                 off of the $gp register).

     -S          Display source code intermixed with the assembly code.
                 There is no guarantee that the source code displayed is
                 the source code used to compile the function, since dis
                 simply looks for a source file starting with name/path
                 given in the object and continuing by looking in
                 directories specified with -I (if any) and accepts the
                 first appropriately-named file it finds as the source
                 file.  If -S is repeated on the command line dis will, in
                 addition, name the source file involved (with whatever
                 path was used to acess the file), as in the example:

                      Skipping source listing to line 10 of /b/t.c...

     -T          Trace flag is for debugging of the disassembler itself.

     -t section  Disassemble the named section as a text section.

     -v          Attempts to print the names of inlined functions where the
                 function is inlined.  The information about inlines is not
                 always present in the debug information, so this option
                 will not always produce the inlined function names.

     -V          Print the version of dis being executed.

     -w          Attempts to print source information (names of user
                 variables involved) after (to the right of) assembly
                 codes.  This option  comes into effect only if -s is also
                 specified, but does not imply -s.  (But recall from above
                 that -s is on by default unless -svr4 is specified, so -w
                 is effective by itself unless -svr4 was specified.)

     -x          Prints offsets and constants in instructions as hex
                 numbers.  The default is to print instruction offsets and
                 constants as decimal.

     If the -d, -D or -t options are specified, only those named sections
     from each user-supplied filename will be disassembled.  Otherwise, all
     sections containing text will be disassembled.

FILES
     /usr/bin/dis