Documentation for global_types_gen.pl

NAME

global_types_gen.pl

SYNOPSIS

Reconstructs the global types used in a program. Can be used for example to see some of the data types used internally in DSP/BIOS or other libraries where the source code is typically not available. Useful for debugging e.g. postmortem situations. Conceivably host tools could be written which use this data to match up last-state-before-crash with the data structures used in the code.

If you have all the source code available to all the libraries in your program this script is useless - but thats rarely the case.

Works on executables, object files & libraries.

USAGE

global_types_gen <filename.xml>

Example (from a DOS prompt): -

    [>] <ccstudiodir>\dosrun.bat
    [>] ofd6x -xg -o=app.xml app.out
    [>] perl global_types_gen.pl app.xml

... OR ...

    [>] ofdXX -xg <out file> | perl global_types_gen.pl 

OPTIONS

None

DEPENDENCIES

You need to first run OFD which is only available in Codegen Tools >= v5.0 for c6000, v3.0 for C55, v4.0 for C54

Also, you *MUST* run ofdXX -g. The -g flag is essential, otherwise the DWARF DW_AT_stuff tags will *NOT* be in the XML file.

Additional limitations are: -

    > only works on code built with 'new' Codegen ie code built for
      DWARF-Debug (e.g. >= CGT 5.0 for c6x, >= CGT 3.0 for c55x...)
    > only displays C type data. Will not work on C++ classes etc.

DESCRIPTION

Reconstructs the global types used in a program. Can be used for example to see some of the data types used internally in DSP/BIOS or other libraries where the source code is typically not available. Useful for debugging e.g. postmortem situations. Conceivably host tools could be written which use this data to match up last-state-before-crash with the data structures used in the code.

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

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

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,types

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

 Documentation for global_types_gen.pl