DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

list(CP)


list -- produce C source listing from a common object file

Syntax

list [-V] [-h] [-F function] source-file ... [object-file]

Description

The list(CP) command produces a C source listing with line number information attached.

If multiple C source files were used to create the object file, list(CP) accepts multiple file names. The object file is taken to be the last non-C source file argument. If no object file is specified, the default object file, a.out, is used.

This utility operates only on COFF executables. Object files given to list must have been compiled with the -g option of cc(CP).

Line numbers are printed for each line marked as breakpoint inserted by the compiler (generally, each executable C statement that begins a new line of source). Line numbering begins anew for each function. Line 1 is always the line containing the left curly brace, {, that begins the function body. Line numbers are also supplied for inner block redeclarations of local variables so that they can be distinguished by the symbolic debugger.

The following options are interpreted by list and can be given in any order:


-Ffunction
List only the named function. You can specify the -F option many times on the command line.

-h
Suppress heading output.

-V
Print, on stderr, the version number of the list command that is executing.

Exit values

list always returns 0.

Diagnostics

The list command produces the error message list: name: cannot open if it cannot read name.

If the source file names do not end in .c, the message is list: name: invalid C source name.

An invalid object file causes the message list: name: bad magic.

If some or all of the symbolic debugging information is missing, one of the following messages is printed:

list: name: symbols have been stripped, cannot proceed
list: name: cannot read line numbers
list: name: not in symbol table

The following messages are produced when list has become confused by #ifdef's in the source file:

list: name: cannot find function in symbol table
list: name: out of sync: too many }
list: name: unexpected end-of-file

The error message list: name: missing or inappropriate line numbers means that either symbol debugging information is missing, or list has been confused by C preprocessor statements.

Warning

Since list does not use the C preprocessor, it might not recognize function definitions whose syntax has been distorted by C preprocessor macro substitutions.

See also

as(CP), cc(CP), ld(CP)

Standards conformance

list is not part of any currently supported standard; it is an extension of AT&T System V provided by The Santa Cruz Operation, Inc.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005