gprofng-display-src - Man Page

Display source code and optionally disassembly of the target object

Synopsis

gprofng display src [option(s)] target-file

Description

Display the source code listing, or source code interleaved with disassembly code, as extracted from the target file (an executable, shared object, object file, or a Java .class file).

For example, this command displays the source code and disassembly listing for a function called mxv_core that is part of object file mxv.o:

        $ gprofng display src -disasm mxv_core mxv.o

To list the source code and disassembly for all the functions in this file, use the following command:

        $ gprofng display src -disasm all -1 mxv.o

The target-file is the name of an executable, a shared object, an object file (.o), or a Java .class file.

If no options are given, the source code listing of the target-file is shown.  This is equivalent to -source all -1.  If this information is not available, a message to this extent is printed.

Options

--version

Print the version number and exit.

--help

Print usage information and exit.

-functions

List all the functions from the given object.

-source item tag

Show the source code for item in target-file.  The tag is used to differentiate in case there are multiple occurences with the same name. See the Notes section for the definition of item and tag.

-disasm item tag

Include the disassembly in the source listing.  The default listing does not include the disassembly.  If the source code is not available, show a listing of the disassembly only. See the Notes section for the definition of item and tag.

-outfile filename

Write results to file filename.  A dash (-) writes to stdout. This is also the default.  Note that this option only affects those options included to the right of the option.

Notes

Use item to specify the name of a function, or of a source or object file that was used to build the executable, or shared object.

The tag is an index used to determine which item is being referred to when multiple functions have the same name.  It is required, but will be ignored if not necessary to resolve the function.

The item may also be specified in the form function`file`, in which case the source or disassembly of the named function in the source context of the named file will be used.

The special item and tag combination all -1, is used to indicate generating the source, or disassembly, for all functions in the target-file.

See Also

gprofng(1), gprofng-archive(1), gprofng-collect-app(1), gprofng-display-html(1), gprofng-display-text(1)

The user guide for gprofng is maintained as a Texinfo manual.  If the info and gprofng programs are correctly installed, the command info gprofng should give access to this document.

Referenced By

gprofng(1), gprofng-archive(1), gprofng-collect-app(1), gprofng-display-html(1), gprofng-display-text(1).

2024-11-26 binutils-2.43.50