Overall structure

When the navigator is first run, it creates a menu with several buttons on it, presenting the main options available to the user (see Figure 4.1). The ``Load Hierarchy'' button allows the user to load a program into the navigator. When clicked, it brings up a standard file chooser widget which asks the user for the makefile of a program. When the user selects the makefile, the navigator modifies the file so that any occurrence of ``g++'' is replaced by ``g++ -gMatsStufffilename'', where filename is a default pipe in the /tmp directory which will be used to send data from the compiler to the navigator. A comment is also added to the start of the file to ensure that a makefile is never modified more than once. The navigator then forks a process that invokes the standard make command on the modified makefile, which will invoke the modified version of g++ which parses the new argument and will use the pipe to send data to the navigator.

Figure 4.1: The navigator's main window
\begin{figure}\centerline{\psfig{figure=mainwin.ps,height=7cm}}
\end{figure}

The data that is output by g++ is in an ASCII text format designed to be understandable to a human with some effort. Lines are printed that represent:

A sample section of output is shown in Figure 4.2. Each object such as a declaration or a type is given a unique identifier which is used in cross-references.

Figure 4.2: Sample output from the modified g++
\begin{figure}\verbatimfile{sample.txt}
\end{figure}

The navigator parses this simplified representation of the program and organises it into its own data structures. The navigator then automatically displays a function window that represents the global group for the program, as a starting point for further exploration by the user. The global group remains during the rest of the user's exploration.

Matthew Exon 2004-05-28