157
Chapter 2 Applications Programming
nm29
to determine the names of any static constructor and destructor functions.
The C++ translator builds these functions as necessary and tags their names with
predefined character sequences. The output from
nm29
is passed to
munch29
which looks for constructor and destructor names. If found,
munch29
builds C
procedures which call all the identified object constructors and destructors.
Because the constructor functions must execute before the application
main()
program, the original program is relinked with the constructor procedures being
called before
main()
. The
main()
entry is replaced with
_main()
. This also
enables the call to destructor procedures to be made in
_main()
when
main()
returns.
Because G++ is now available for C++ code development (note, G++ is
incorporated into the GCC compiler), there is little use being made of the AT&T
cfront
preprocessor. Additionally, MRI and Metaware are expected to shortly
have commercial C++ compilers available.
rdcoff
The
rdcoff
utility is only available to purchasers of the High C 29K product.
This utility prints the contents of a COFF conforming object file. Each COFF
file section is presented in an appropriate format. For example, text sections are
disassembled. If the symbol table has not been striped from the COFF file, then
symbol values are shown. The utility is useful for examining COFF header
information, such as the text and data region start addresses. Those using GNU
tools can use the
coff
and
objdump
utilities to obtain this information.
coff
This utility is a shorthand way of examining COFF files. It reports a summary of
COFF header information, followed by similar reports for each of the sections
found in the object file. The utility is useful for quickly checking the link
mapping of a.out type files; especially when a project is using a number of
different 29K target systems which have different memory system layouts,
requiring different program linkage.
objdump
This utility is supplied with the GNU tool chain. It can be used to examine
selected parts of object files. It has an array of command line options which are
compatible with the UNIX System V utility of the same name. In a similar way
to the
rdcoff
utility it attempts to format selected information in a meaningful
way.
swaf
This utility is used to produce a General–Purpose ASCII (PGA) symbols file for
use with Hewlett–Packard’s B3740A Software Analyzer tool. This tool enables
a 16500B card cage along with a selection of logic analyzer cards to support
high level software debugging. The
swaf
utility builds a GPA symbols file from