Documentation for func_info.pl

NAME

func_info.pl

SYNOPSIS

It produces a listing of all functions ranges and sizes in CSV format e.g.

    HOSTclose, trgdrv.c, 0x000070e0, 0x0000719c, 188
    HOSTlseek, trgdrv.c, 0x00005ec0, 0x00005fd8, 280

Basically it shows each function, the C/asm file it came from, its function range (ie start -> end PC), and its size (end - start)

Works on executables, object files & libraries. However, the Low & High PC are basically meaningless on libraries. Only on out files (ie after linker placement) do these make sense. We keep Low & High PC in the output for libraries simply to aid programmers who want to write 1 script to post-parse the CSV produced from this perl script.

Works for any ISA.

Should be fairly fast since we strip out unneeded elements of the large XML file before we process it. In Windows, works fastest when run on an existing XML file as compared to piping (ofdNN -xg a.out | perl b.pl). In Linux/Solaris, piping is just as fast (and avoids storing big XML files)

LIMITATIONS

USAGE

func_info.pl [options] xml_file

   ... OR ...

ofdXX -g -x out_file | perl func_info.pl [options]

OPTIONS

 -h                 : Dump usage and quit
 --no_header        : Disable writing out header row in CSV format
 --sorted           : Print in func name sorted order (handy for diff's)
 --cg_xml_version   : Print out the version of the cg_xml package in use

CREATING XML INPUT

OFD stands for Object File Display utility. Examples include ofd6x for C6000 and ofd55 for C5500.

Use the -x and -g options of OFD to create the XML file. Example ...

      ofd6x -x -g -o=file.xml file.out

Alternatively, pipe the output from OFD into the script ...

      ofd6x -x -g file.out | perl func_info.pl
   ...

OFD OPTIONS

Recent releases of OFD support options for filtering the XML output down to what is strictly of interest. The best options to use in combination with this script are:

   -xg --xml_indent=0 --obj_display=none --dwarf_display=none,dinfo

Filtering the XML in this way reduces the amount of data processed by this script, thus making it run faster.

PERL VERSION DETAILS

This script was written using Perl version 5.8.3. It may not work with earlier revisions of Perl.

 Documentation for func_info.pl