GP-DISPLAY-SRC.1(1) User Commands GP-DISPLAY-SRC.1(1)

gp-display-src - Display source code and optionally disassembly of the target object

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

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.

Print the version number and exit.
Print usage information and exit.
List all the functions from the given object.
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.
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.
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.

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.

gprofng(1), gp-archive(1), gp-collect-app(1), gp-display-gui(1), gp-display-html(1), gp-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.

Copyright (c) 2022-2024 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".

2024-08-05 binutils-2.43.0