Documentation for XML_TI_MAP.pm

NAME

XML_TI_MAP.pm

SYNOPSIS

Perl module for converting XML files generated by TI linkers into Perl data structures

USAGE

   use XML_TI_MAP;                                    # no names imported

OR ...

   use XML_TI_MAP qw(process_xml_file                 # import names
                     %symtab %rev_symtab
                     $output_sections $input_sections $files);

DESCRIPTION

TI linkers can create a map file in XML format with the option --xml_link_info=<filename>. Use this module to turn that XML data into far more useful Perl data structures.

This module should be delivered with at least one example usage file "dump_map.pl". Start by using and exploring that script. All it does is read in the XML file and dump out the resulting Perl data structures. Understanding those data structures is key to implementing any further object file post-processing routines.

FUNCTIONS DEFINED

XML_TI_MAP::process_xml_file

   Input   : One argument; name of the XML file
   Returns : Data structure representing the XML

XML_TI_MAP::cg_xml_version

If the command line option --cg_xml_version is present, print out, on stderr, the version of the cg_xml package in use. Must be called BEFORE the main script does any command line processing.

VARIABLES DEFINED

$XML_TI_MAP::debug

Whether to dump the Perl data structures to stdout

Since $debug is such a common variable name, it is not exported from this package. Thus any access must be fully qualified as written above. All other functions and variable names can be written without the XML_TI_MAP qualifier if they are imported in the use statement.

 Documentation for XML_TI_MAP.pm