Home | History | Annotate | Line # | Download | only in doc
      1  1.1  christos @c ----------------------------------------------------------------------------
      2  1.1  christos @c This is the Texinfo source file for the gprofng-display-src man page.
      3  1.1  christos @c
      4  1.1  christos @c Author: Ruud van der Pas
      5  1.1  christos @c ----------------------------------------------------------------------------
      6  1.1  christos @ifset man
      7  1.1  christos \input texinfo @c -*-texinfo-*-
      8  1.1  christos @setfilename gprofng-display-src
      9  1.1  christos @settitle Display source code and optionally disassembly of the target object
     10  1.1  christos @include gp-macros.texi
     11  1.1  christos @end ifset
     12  1.1  christos 
     13  1.1  christos @c ----------------------------------------------------------------------------
     14  1.1  christos @c This is from the man-pages(7) man page
     15  1.1  christos @c
     16  1.1  christos @c "The list below shows conventional or suggested sections.  Most manual pages
     17  1.1  christos @c  should include at least the highlighted sections.  Arrange a new manual
     18  1.1  christos @c  page so that sections are placed in the order shown in the list."
     19  1.1  christos @c
     20  1.1  christos @c              NAME
     21  1.1  christos @c              SYNOPSIS
     22  1.1  christos @c              CONFIGURATION    [Normally only in Section 4]
     23  1.1  christos @c              DESCRIPTION
     24  1.1  christos @c              OPTIONS          [Normally only in Sections 1, 8]
     25  1.1  christos @c              EXIT STATUS      [Normally only in Sections 1, 8]
     26  1.1  christos @c              RETURN VALUE     [Normally only in Sections 2, 3]
     27  1.1  christos @c              ERRORS           [Typically only in Sections 2, 3]
     28  1.1  christos @c              ENVIRONMENT
     29  1.1  christos @c              FILES
     30  1.1  christos @c              VERSIONS         [Normally only in Sections 2, 3]
     31  1.1  christos @c              ATTRIBUTES       [Normally only in Sections 2, 3]
     32  1.1  christos @c              CONFORMING TO
     33  1.1  christos @c              NOTES
     34  1.1  christos @c              BUGS
     35  1.1  christos @c              EXAMPLES
     36  1.1  christos @c              AUTHORS          [Discouraged]
     37  1.1  christos @c              REPORTING BUGS   [Not used in man-pages]
     38  1.1  christos @c              COPYRIGHT        [Not used in man-pages]
     39  1.1  christos @c              SEE ALSO
     40  1.1  christos @c
     41  1.1  christos @c This is what the texi2pod.pl tool recognizes:
     42  1.1  christos @c
     43  1.1  christos @c for $sect (qw(NAME SYNOPSIS TARGET DESCRIPTION OPTIONS ENVIRONMENT FILES
     44  1.1  christos @c               BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) {
     45  1.1  christos @c
     46  1.1  christos @c What is interesting is that it places "SEE ALSO" before "COPYRIGHT", which
     47  1.1  christos @c makes sense and adhered to for the other formats.
     48  1.1  christos @c ----------------------------------------------------------------------------
     49  1.1  christos 
     50  1.1  christos @c ----------------------------------------------------------------------------
     51  1.1  christos @c NAME section
     52  1.1  christos @c ----------------------------------------------------------------------------
     53  1.1  christos 
     54  1.1  christos @ManPageStart{NAME}
     55  1.1  christos @c man begin NAME
     56  1.1  christos 
     57  1.1  christos gprofng-display-src - Display the source code, optionally interleaved with the
     58  1.1  christos disassembly of the target object
     59  1.1  christos 
     60  1.1  christos @c man end
     61  1.1  christos @ManPageEnd{}
     62  1.1  christos 
     63  1.1  christos @c ----------------------------------------------------------------------------
     64  1.1  christos @c SYNOPSIS section
     65  1.1  christos @c ----------------------------------------------------------------------------
     66  1.1  christos 
     67  1.1  christos @ManPageStart{SYNOPSIS}
     68  1.1  christos @c man begin SYNOPSIS
     69  1.1  christos 
     70  1.1  christos @command{gprofng display src} [@var{option(s)}] @var{target-file}
     71  1.1  christos 
     72  1.1  christos @c man end
     73  1.1  christos @ManPageEnd{}
     74  1.1  christos 
     75  1.1  christos @c ----------------------------------------------------------------------------
     76  1.1  christos @c DESCRIPTION section
     77  1.1  christos @c ----------------------------------------------------------------------------
     78  1.1  christos 
     79  1.1  christos @ManPageStart{DESCRIPTION}
     80  1.1  christos @c man begin DESCRIPTION
     81  1.1  christos 
     82  1.1  christos Display the source code listing, or source code interleaved with disassembly
     83  1.1  christos code, as extracted from the target file (an executable, shared object, object
     84  1.1  christos file, or a Java .class file).
     85  1.1  christos 
     86  1.1  christos For example, this command displays the source code and disassembly listing for
     87  1.1  christos a function called @samp{mxv_core} that is part of object file @samp{mxv.o}:
     88  1.1  christos 
     89  1.1  christos @smallexample
     90  1.1  christos $ gprofng display src -disasm mxv_core mxv.o
     91  1.1  christos @end smallexample
     92  1.1  christos 
     93  1.1  christos To list the source code and disassembly for all the functions in this file,
     94  1.1  christos use the following command:
     95  1.1  christos 
     96  1.1  christos @smallexample
     97  1.1  christos $ gprofng display src -disasm all -1 mxv.o
     98  1.1  christos @end smallexample
     99  1.1  christos 
    100  1.1  christos The @var{target-file} is the name of an executable, a shared object, an object
    101  1.1  christos file (.o), or a Java .class file.
    102  1.1  christos 
    103  1.1  christos If no options are given, the source code listing of the @var{target-file}
    104  1.1  christos is shown.  This is equivalent to @samp{-source all -1}.  If this information
    105  1.1  christos is not available, a message to this extent is printed.
    106  1.1  christos 
    107  1.1  christos @c man end
    108  1.1  christos @ManPageEnd{}
    109  1.1  christos 
    110  1.1  christos @c ----------------------------------------------------------------------------
    111  1.1  christos @c OPTIONS section
    112  1.1  christos @c ----------------------------------------------------------------------------
    113  1.1  christos 
    114  1.1  christos @ManPageStart{OPTIONS}
    115  1.1  christos @c man begin OPTIONS
    116  1.1  christos 
    117  1.1  christos @table @gcctabopt
    118  1.1  christos 
    119  1.1  christos @item --version
    120  1.1  christos @ifclear man
    121  1.1  christos @IndexSubentry{Options, @code{--version}}
    122  1.1  christos @end ifclear
    123  1.1  christos 
    124  1.1  christos Print the version number and exit.
    125  1.1  christos 
    126  1.1  christos @item --help
    127  1.1  christos @ifclear man
    128  1.1  christos @IndexSubentry{Options, @code{--help}}
    129  1.1  christos @end ifclear
    130  1.1  christos 
    131  1.1  christos Print usage information and exit.
    132  1.1  christos 
    133  1.1  christos @item -functions
    134  1.1  christos @ifclear man
    135  1.1  christos @IndexSubentry{Options,  @code{-functions}}
    136  1.1  christos @IndexSubentry{Commands, @code{functions}}
    137  1.1  christos @end ifclear
    138  1.1  christos List all the functions from the given object.
    139  1.1  christos 
    140  1.1  christos @item -source @var{item} @var{tag}
    141  1.1  christos @ifclear man
    142  1.1  christos @IndexSubentry{Options, @code{-source}}
    143  1.1  christos @IndexSubentry{Commands, @code{source}}
    144  1.1  christos @end ifclear
    145  1.1  christos Show the source code for @var{item} in @var{target-file}.  The @var{tag}
    146  1.1  christos is used to differentiate in case there are multiple occurences with the same
    147  1.1  christos name.
    148  1.1  christos See the @samp{NOTES} section for the definition of @var{item} and @var{tag}.
    149  1.1  christos 
    150  1.1  christos @item -disasm @var{item} @var{tag}
    151  1.1  christos @ifclear man
    152  1.1  christos @IndexSubentry{Options,  @code{-disasm}}
    153  1.1  christos @IndexSubentry{Commands, @code{disasm}}
    154  1.1  christos @end ifclear
    155  1.1  christos Include the disassembly in the source listing.  The default listing does not
    156  1.1  christos include the disassembly.  If the source code is not available, show a listing
    157  1.1  christos of the disassembly only.
    158  1.1  christos See the @samp{NOTES} section for the definition of @var{item} and @var{tag}.
    159  1.1  christos 
    160  1.1  christos @item -outfile @var{filename}
    161  1.1  christos @ifclear man
    162  1.1  christos @IndexSubentry{Options,  @code{-outfile}}
    163  1.1  christos @IndexSubentry{Commands, @code{outfile}}
    164  1.1  christos @end ifclear
    165  1.1  christos Write results to file @var{filename}.  A dash (@minus{}) writes to stdout.
    166  1.1  christos This is also the default.  Note that this option only affects those options
    167  1.1  christos included to the right of the option.
    168  1.1  christos 
    169  1.1  christos @end table
    170  1.1  christos 
    171  1.1  christos @c man end
    172  1.1  christos @ManPageEnd{}
    173  1.1  christos 
    174  1.1  christos @c ----------------------------------------------------------------------------
    175  1.1  christos @c NOTES section
    176  1.1  christos @c ----------------------------------------------------------------------------
    177  1.1  christos 
    178  1.1  christos @ManPageStart{NOTES}
    179  1.1  christos @c man begin NOTES
    180  1.1  christos 
    181  1.1  christos Use @var{item} to specify the name of a function, or of a source or object
    182  1.1  christos file that was used to build the executable, or shared object.
    183  1.1  christos 
    184  1.1  christos The @var{tag} is an index used to determine which item is being referred
    185  1.1  christos to when multiple functions have the same name.  It is required, but will
    186  1.1  christos be ignored if not necessary to resolve the function.
    187  1.1  christos 
    188  1.1  christos The @var{item} may also be specified in the form @samp{function`file`}, in
    189  1.1  christos which case the source or disassembly of the named function in the source
    190  1.1  christos context of the named file will be used.
    191  1.1  christos 
    192  1.1  christos The special @var{item} and @var{tag} combination @samp{all -1}, is used to
    193  1.1  christos indicate generating the source, or disassembly, for all functions in the
    194  1.1  christos @var{target-file}.
    195  1.1  christos 
    196  1.1  christos @c man end
    197  1.1  christos @ManPageEnd{}
    198  1.1  christos 
    199  1.1  christos @c ----------------------------------------------------------------------------
    200  1.1  christos @c SEEALSO section
    201  1.1  christos @c ----------------------------------------------------------------------------
    202  1.1  christos 
    203  1.1  christos @ManPageStart{SEE ALSO}
    204  1.1  christos @c man begin SEEALSO
    205  1.1  christos 
    206  1.1  christos gprofng(1),
    207  1.1  christos gprofng-archive(1),
    208  1.1  christos gprofng-collect-app(1),
    209  1.1  christos @c -- gprofng-display-gui(1),
    210  1.1  christos gprofng-display-html(1),
    211  1.1  christos gprofng-display-text(1)
    212  1.1  christos 
    213  1.1  christos @iftex
    214  1.1  christos @vspace{1}
    215  1.1  christos @end iftex
    216  1.1  christos 
    217  1.1  christos The user guide for gprofng is maintained as a Texinfo manual.  If the
    218  1.1  christos @command{info} and @command{gprofng} programs are correctly installed, the
    219  1.1  christos command @command{info gprofng} should give access to this document.
    220  1.1  christos 
    221  1.1  christos @c man end
    222  1.1  christos @ManPageEnd{}
    223  1.1  christos 
    224  1.1  christos @c ----------------------------------------------------------------------------
    225  1.1  christos @c COPYRIGHT section
    226  1.1  christos @c ----------------------------------------------------------------------------
    227  1.1  christos 
    228  1.1  christos @ManPageStart{COPYRIGHT}
    229  1.1  christos @c man begin COPYRIGHT
    230  1.1  christos 
    231  1.1  christos Copyright @copyright{} 2022-2025 Free Software Foundation, Inc.
    232  1.1  christos 
    233  1.1  christos Permission is granted to copy, distribute and/or modify this document
    234  1.1  christos under the terms of the GNU Free Documentation License, Version 1.3
    235  1.1  christos or any later version published by the Free Software Foundation;
    236  1.1  christos with no Invariant Sections, with no Front-Cover Texts, and with no
    237  1.1  christos Back-Cover Texts.  A copy of the license is included in the
    238  1.1  christos section entitled ``GNU Free Documentation License''.
    239  1.1  christos 
    240  1.1  christos @c man end
    241  1.1  christos @ManPageEnd{}
    242  1.1  christos 
    243  1.1  christos @c ----------------------------------------------------------------------------
    244  1.1  christos @c If this text is used for a man page, exit.  Otherwise we need to continue.
    245  1.1  christos @c ----------------------------------------------------------------------------
    246  1.1  christos 
    247  1.1  christos @ifset man
    248  1.1  christos @bye
    249  1.1  christos @end ifset
    250