| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45) |
| 3 |
.\" |
| 4 |
.\" Standard preamble: |
| 5 |
.\" ======================================================================== |
| 6 |
.de Sp \" Vertical space (when we can't use .PP) |
| 7 |
.if t .sp .5v |
| 8 |
.if n .sp |
| 9 |
.. |
| 10 |
.de Vb \" Begin verbatim text |
| 11 |
.ft CW |
| 12 |
.nf |
| 13 |
.ne \\$1 |
| 14 |
.. |
| 15 |
.de Ve \" End verbatim text |
| 16 |
.ft R |
| 17 |
.fi |
| 18 |
.. |
| 19 |
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. |
| 20 |
.ie n \{\ |
| 21 |
. ds C` "" |
| 22 |
. ds C' "" |
| 23 |
'br\} |
| 24 |
.el\{\ |
| 25 |
. ds C` |
| 26 |
. ds C' |
| 27 |
'br\} |
| 28 |
.\" |
| 29 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 30 |
.ie \n(.g .ds Aq \(aq |
| 31 |
.el .ds Aq ' |
| 32 |
.\" |
| 33 |
.\" If the F register is >0, we'll generate index entries on stderr for |
| 34 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 35 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 36 |
.\" output yourself in some meaningful fashion. |
| 37 |
.\" |
| 38 |
.\" Avoid warning from groff about undefined register 'F'. |
| 39 |
.de IX |
| 40 |
.. |
| 41 |
.nr rF 0 |
| 42 |
.if \n(.g .if rF .nr rF 1 |
| 43 |
.if (\n(rF:(\n(.g==0)) \{\ |
| 44 |
. if \nF \{\ |
| 45 |
. de IX |
| 46 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 47 |
.. |
| 48 |
. if !\nF==2 \{\ |
| 49 |
. nr % 0 |
| 50 |
. nr F 2 |
| 51 |
. \} |
| 52 |
. \} |
| 53 |
.\} |
| 54 |
.rr rF |
| 55 |
.\" |
| 56 |
.\" Required to disable full justification in groff 1.23.0. |
| 57 |
.if n .ds AD l |
| 58 |
.\" ======================================================================== |
| 59 |
.\" |
| 60 |
.IX Title "GPROFNG-DISPLAY-SRC 1" |
| 61 |
.TH GPROFNG-DISPLAY-SRC 1 2025-07-27 binutils-2.45 "User Commands" |
| 62 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 63 |
.\" way too many mistakes in technical documents. |
| 64 |
.if n .ad l |
| 65 |
.nh |
| 66 |
.SH NAME |
| 67 |
gprofng\-display\-src \- Display source code and optionally disassembly of the target object |
| 68 |
.SH SYNOPSIS |
| 69 |
.IX Header "SYNOPSIS" |
| 70 |
\&\fBgprofng display src\fR [\fIoption(s)\fR] \fItarget\-file\fR |
| 71 |
.SH DESCRIPTION |
| 72 |
.IX Header "DESCRIPTION" |
| 73 |
Display the source code listing, or source code interleaved with disassembly |
| 74 |
code, as extracted from the target file (an executable, shared object, object |
| 75 |
file, or a Java .class file). |
| 76 |
.PP |
| 77 |
For example, this command displays the source code and disassembly listing for |
| 78 |
a function called \fBmxv_core\fR that is part of object file \fBmxv.o\fR: |
| 79 |
.PP |
| 80 |
.Vb 1 |
| 81 |
\& $ gprofng display src \-disasm mxv_core mxv.o |
| 82 |
.Ve |
| 83 |
.PP |
| 84 |
To list the source code and disassembly for all the functions in this file, |
| 85 |
use the following command: |
| 86 |
.PP |
| 87 |
.Vb 1 |
| 88 |
\& $ gprofng display src \-disasm all \-1 mxv.o |
| 89 |
.Ve |
| 90 |
.PP |
| 91 |
The \fItarget\-file\fR is the name of an executable, a shared object, an object |
| 92 |
file (.o), or a Java .class file. |
| 93 |
.PP |
| 94 |
If no options are given, the source code listing of the \fItarget\-file\fR |
| 95 |
is shown. This is equivalent to \fB\-source all \-1\fR. If this information |
| 96 |
is not available, a message to this extent is printed. |
| 97 |
.SH OPTIONS |
| 98 |
.IX Header "OPTIONS" |
| 99 |
.IP \fB\-\-version\fR 4 |
| 100 |
.IX Item "--version" |
| 101 |
Print the version number and exit. |
| 102 |
.IP \fB\-\-help\fR 4 |
| 103 |
.IX Item "--help" |
| 104 |
Print usage information and exit. |
| 105 |
.IP \fB\-functions\fR 4 |
| 106 |
.IX Item "-functions" |
| 107 |
List all the functions from the given object. |
| 108 |
.IP "\fB\-source\fR \fIitem\fR\fB \fR\fItag\fR" 4 |
| 109 |
.IX Item "-source item tag" |
| 110 |
Show the source code for \fIitem\fR in \fItarget\-file\fR. The \fItag\fR |
| 111 |
is used to differentiate in case there are multiple occurences with the same |
| 112 |
name. |
| 113 |
See the \fBNOTES\fR section for the definition of \fIitem\fR and \fItag\fR. |
| 114 |
.IP "\fB\-disasm\fR \fIitem\fR\fB \fR\fItag\fR" 4 |
| 115 |
.IX Item "-disasm item tag" |
| 116 |
Include the disassembly in the source listing. The default listing does not |
| 117 |
include the disassembly. If the source code is not available, show a listing |
| 118 |
of the disassembly only. |
| 119 |
See the \fBNOTES\fR section for the definition of \fIitem\fR and \fItag\fR. |
| 120 |
.IP "\fB\-outfile\fR \fIfilename\fR" 4 |
| 121 |
.IX Item "-outfile filename" |
| 122 |
Write results to file \fIfilename\fR. A dash (\-) writes to stdout. |
| 123 |
This is also the default. Note that this option only affects those options |
| 124 |
included to the right of the option. |
| 125 |
.SH NOTES |
| 126 |
.IX Header "NOTES" |
| 127 |
Use \fIitem\fR to specify the name of a function, or of a source or object |
| 128 |
file that was used to build the executable, or shared object. |
| 129 |
.PP |
| 130 |
The \fItag\fR is an index used to determine which item is being referred |
| 131 |
to when multiple functions have the same name. It is required, but will |
| 132 |
be ignored if not necessary to resolve the function. |
| 133 |
.PP |
| 134 |
The \fIitem\fR may also be specified in the form \fBfunction\`file\`\fR, in |
| 135 |
which case the source or disassembly of the named function in the source |
| 136 |
context of the named file will be used. |
| 137 |
.PP |
| 138 |
The special \fIitem\fR and \fItag\fR combination \fBall \-1\fR, is used to |
| 139 |
indicate generating the source, or disassembly, for all functions in the |
| 140 |
\&\fItarget\-file\fR. |
| 141 |
.SH "SEE ALSO" |
| 142 |
.IX Header "SEE ALSO" |
| 143 |
\&\fBgprofng\fR\|(1), |
| 144 |
\&\fBgprofng\-archive\fR\|(1), |
| 145 |
\&\fBgprofng\-collect\-app\fR\|(1), |
| 146 |
\&\fBgprofng\-display\-html\fR\|(1), |
| 147 |
\&\fBgprofng\-display\-text\fR\|(1) |
| 148 |
.PP |
| 149 |
The user guide for gprofng is maintained as a Texinfo manual. If the |
| 150 |
\&\fBinfo\fR and \fBgprofng\fR programs are correctly installed, the |
| 151 |
command \fBinfo gprofng\fR should give access to this document. |
| 152 |
.SH COPYRIGHT |
| 153 |
.IX Header "COPYRIGHT" |
| 154 |
Copyright (c) 2022\-2025 Free Software Foundation, Inc. |
| 155 |
.PP |
| 156 |
Permission is granted to copy, distribute and/or modify this document |
| 157 |
under the terms of the GNU Free Documentation License, Version 1.3 |
| 158 |
or any later version published by the Free Software Foundation; |
| 159 |
with no Invariant Sections, with no Front\-Cover Texts, and with no |
| 160 |
Back\-Cover Texts. A copy of the license is included in the |
| 161 |
section entitled "GNU Free Documentation License". |