3 lines
6.1 KiB
HTML
3 lines
6.1 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><title>18. MASTERSCOPE</title><link href="navigation.css" rel="stylesheet" type="text/css"/><link href="document.css" rel="stylesheet" type="text/css"/></head><body><p class="top_nav"><a href="part108.htm">< Previous</a><span> | </span><a href="../Medley-Primer.html">Contents</a><span> | </span><a href="part110.htm">Next ></a></p><h1 style="padding-top: 3pt;padding-left: 35pt;text-indent: 0pt;text-align: left;"><a name="bookmark20">18. MASTERSCOPE</a></h1><p style="padding-left: 35pt;text-indent: 0pt;line-height: 6pt;text-align: left;"><span><img width="640" height="8" alt="image" src="Image_125.png"/></span></p><p style="text-indent: 0pt;text-align: left;"><br/></p><p style="padding-top: 15pt;padding-left: 107pt;text-indent: 0pt;text-align: left;">Masterscope is a tool that allows you to quickly examine the structure of complex</p><p style="padding-left: 107pt;text-indent: 0pt;text-align: left;">programs. As your programs enlarge, you may forget what variables are global, what functions call other functions, and so forth. Masterscope keeps track of this for you.</p><p style="padding-top: 7pt;padding-left: 107pt;text-indent: 0pt;text-align: left;">To use Masterscope, first load <span class="s3">MASTERSCOPE.DFASL </span>and <span class="s3">EXPORTS.ALL</span>.</p><p style="padding-top: 7pt;padding-left: 107pt;text-indent: 0pt;line-height: 107%;text-align: left;">Suppose that <span class="s3">JVTO </span>is the name of a file that contains many of the functions involved in a complex system and that <span class="s3">LINTRANS </span>is the file containing the remaining functions. The first step is to ask Masterscope to analyze these files. These files must be loaded.</p><p style="padding-left: 107pt;text-indent: 0pt;line-height: 11pt;text-align: left;">All Masterscope queries and commands begin with a period followed by a space, as in</p><p class="s3" style="padding-top: 7pt;padding-left: 143pt;text-indent: 0pt;text-align: left;">. ANALYZE FNS ON MSCOPEDEMO</p><p style="padding-top: 7pt;padding-left: 107pt;text-indent: 0pt;line-height: 107%;text-align: left;">The <span class="s3">ANALYZE </span>process takes a while, so the system prints a period on the screen for each function it has analyzed. (See Figure 18-1)</p><p style="text-indent: 0pt;text-align: left;"><br/></p><p style="padding-left: 136pt;text-indent: 0pt;text-align: left;"><span><img width="402" height="85" alt="image" src="Image_126.gif"/></span></p><p style="text-indent: 0pt;text-align: left;"><br/></p><p style="padding-left: 111pt;text-indent: 0pt;text-align: center;">Figure 18-1. Executive Window After Analyzing Files</p><p style="padding-top: 7pt;padding-left: 106pt;text-indent: 0pt;line-height: 107%;text-align: left;">If you are not quite sure what functions were just analyzed, type the file’s <span class="s3">COMS </span>variable (see the File Variables section in Chapter 7) into the Executive Window. The names of</p><p style="padding-left: 107pt;text-indent: 0pt;line-height: 11pt;text-align: left;">the functions stored on the file will be a part of the value of this variable.</p><p style="padding-top: 7pt;padding-left: 107pt;text-indent: 0pt;text-align: left;">A variety of commands are now possible, all referring to individual functions within the analyzed files. Substantial variation in exact wording is permitted. Some commands</p><p style="padding-left: 107pt;text-indent: 0pt;text-align: left;">are:</p><p class="s3" style="padding-top: 7pt;padding-left: 106pt;text-indent: 0pt;text-align: left;">. SHOW PATHS FROM ANY TO ANY</p><p class="s3" style="padding-left: 106pt;text-indent: 0pt;text-align: left;">. EDIT WHERE ANY CALLS <span class="s4">functionname</span></p><p class="s3" style="padding-left: 106pt;text-indent: 0pt;text-align: left;">. EDIT WHERE ANY USES <span class="s4">variablename</span></p><p class="s3" style="padding-left: 106pt;text-indent: 0pt;text-align: left;">. WHO CALLS WHOM</p><p class="s3" style="padding-left: 106pt;text-indent: 0pt;text-align: left;">. WHO CALLS <span class="s4">functionname</span></p><p class="s3" style="padding-left: 106pt;text-indent: 0pt;text-align: left;">. BY WHOM IS <span class="s4">functionname </span>CALLED</p><p class="s3" style="padding-left: 107pt;text-indent: 0pt;text-align: left;">. WHO USES <span class="s4">variablename </span>AS FIELD</p><p style="text-indent: 0pt;text-align: left;"><br/></p><p style="padding-left: 106pt;text-indent: 0pt;text-align: left;">Note that the function is being called to invoke each command. Refer to the <i>IRM </i>for commands not listed here.</p><p style="padding-top: 7pt;padding-left: 106pt;text-indent: 0pt;line-height: 107%;text-align: left;">Figure 18-2 shows the Executive Window after the commands <span class="s3">. WHO CALLS GobbleDump </span>and <span class="s3">. WHO DOES JVL inScan CALL</span>.</p><p style="text-indent: 0pt;text-align: left;"><br/></p><p style="padding-left: 135pt;text-indent: 0pt;text-align: left;"><span><img width="402" height="86" alt="image" src="Image_127.gif"/></span></p><p style="text-indent: 0pt;text-align: left;"><br/></p><p style="padding-left: 111pt;text-indent: 0pt;text-align: center;">Figure 18-2. Sample Masterscope Output</p><p class="s7" style="padding-top: 3pt;padding-left: 35pt;text-indent: 0pt;text-align: left;"> 18. MASTERSCOPE </p><p style="text-indent: 0pt;text-align: left;"><br/></p><p class="toc"> </p><div class="toc"><a class="toc0" href="part110.htm">SHOW DATA Command and GRAPHER </a></div><p class="nav"> </p><p class="nav"> </p><p class="nav"><a href="part108.htm">< Previous</a><span> | </span><a href="../Medley-Primer.html">Contents</a><span> | </span><a href="part110.htm">Next ></a></p><p class="nav"> </p></body></html>
|