NAME

gprofng-display-src - Display the source code, optionally interleaved with the disassembly of the target object

ManPageEnd

SYNOPSIS

gprofng display src [OPTION(S)] TARGET-FILE

ManPageEnd

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.

ManPageEnd

OPTIONS

--version
     Options, --version

     Print the version number and exit.

--help
     Options, --help

     Print usage information and exit.

-functions
     Options,  -functions Commands, functions List all the functions from the given object.

-source ITEM TAG
     Options, -source Commands, source 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
     Options,  -disasm Commands, disasm 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
     Options,  -outfile Commands, outfile 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.

ManPageEnd

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.

ManPageEnd

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.

ManPageEnd

COPYRIGHT

Copyright © 2022-2025 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts.  A copy of the license is included in the section entitled ``GNU Free Documentation License''.

ManPageEnd