Abstract:
A logic state analyzer allows a user to include symbols defined in source program listings, as well as other specially defined symbols, in the trace specification. Such symbols represent unique individual values or ranges of values. The resulting trace list includes these symbols, and where possible, all address, operands, etc., are expressed in such terms. When those symbols are relocatable entities produced by compilers and assemblers the result is that the user is freed from having to duplicate the relocation process to specify absolute values in the trace specification, and later reverse it to interpret absolute values in the listing in terms of symbols originally defined in the source programming. A further result is that the states within an arbitrary finite state machine can be assigned descriptive labels, with the trace specification and trace listing subsequently expressed in those terms. Trace values can also be represented relative to a symbol. The same principles are extendable to handle memory segment offsets invoked by memory management units that automatically convert a relocated virtual address emitted by a processor into a dynamically adjusted run time physical address actually sent to the memory. According to a preferred embodiment of the invention the analyzer makes use of various symbol tables produced by any associated assemblers and compilers, as well as of any additional special symbol definitions desired by the user. The analyzer provides absolute values for these symbols by application of the load map produced during the relocation of the various programs into the target system monitored by the logic analyzer.

Description:
CROSS REFERENCE TO RELATED APPLICATION 
     This application is a continuation of application Ser. No. 481,010, filed Mar. 31, 1983, now abandoned. 
    
    
     FIELD OF THE INVENTION 
     The subject matter of the present invention pertains to improvements in logic state analysis, and may apply to both logic state analyzers and the debuggers used in conjunction with emulators. 
     BACKGROUND AND SUMMARY OF THE INVENTION 
     The development of executable code for processor based systems frequently involves the use of compilers and assemblers that produce relocatable object code. When such programs are subsequently linked and loaded a trace listing provided by a logic state analyzer can be at best tedious to appreciate, and at worst extremely difficult to follow. Even a reverse assembler can not replace a reference to an arbitrary address with the corresponding symbol used in the original source program. To do that requires an appreciation on the part of the user of how the various software tools interact, and of how they modify the relocatable object code to produce a final absolute value. A considerable amount of tedious nondecimal arithmetic may be required to relate the actual events reflected in the trace to a collection of source program listings. The situation would be bad enough in cases where the hardware in the target system is known to be good, and what is being debugged is simply the software. But in many development situations there may be bugs in both the hardware and the software. This makes it especially important to be able to rely on the trace for information about what really happened, as there may well be a discrepancy between actual events and the legitmate aims of even a properly written program. Under these circumstances it would be less wise to think of the trace as a hardware version of the program listing, and more useful to think of the program listing as a guide to understanding the trace. In these types of situations the extra overhead of &#34;unrelocating&#34; a trace can be particularly burdensome. It would be especially desirable if all absolute values for addresses and operands in the trace were replaced with notations involving the symbols used by the programmer in the original source programs. Such symbols might refer to individual locations or to ranges of locations. It would be useful if similar symbols could be defined in addition to the ones found in the source listings, without having to edit the sources to include them. It would also be helpful if references to original source program line numbers could be included in the trace, or even actual source lines. This would aid a great deal in allowing the user to follow overall program flow. 
     Another development or troubleshooting situation pertinent to the invention can arise in connection with the operation of finite state machines. A trace of such a state machine is a sequential series of states: e.g., 001001, 010001, 010011, etc. It is frequently the case these states can be given labels, such as &#34;INC --  P --  REG&#34;, (increment P register), &#34;WAIT --  MEMC&#34;, (wait for Memory Complete), or STM (Start Memory Cycle). It would be desirable if a logic analyzer could provide a listing of the trace in terms of such labeled states. Each state in the listing would either be a label or a value relative to a label. In the latter case there might be several states in some process, say a read memory cycle. The label RMCY might refer to the first state in the process. RMCY+3 would denote the fourth state therein without having to invent labels for every separate state in the process (and by implication, in the entire machine). 
     The ability of the logic state analyzer described herein to integrate source program symbols and source lines into the trace listing arises from giving that analyzer access to the symbol tables produced by any compiler or assembler that produced the code (whether absolute or relocatable) and by giving the analyzer access to the decisions made by the linker or relocating loader. Using this information the analyzer can determine by various inspection processes what symbols to use in the trace listing. 
     A further benefit emerges from the ability to do this. It is then also possible to at once expand and simplify the process of defining the trace specification for the analyzer. The trace specification tells the analyzer under what conditions to commence the trace and exactly what type of information to include therein. With the aid of the invention it is possible to use source program symbols in the trace specification without having to learn what their absolute values are at run time. This is quite useful, as those absolute values are apt to change as bugs are found and fixed, or as different versions of the software are developed and tested. But an analyzer constructed to take advantage of the various symbol tables and the load map need not have its trace specification altered merely because one or more programs are of different lengths than before, or because the programs are loaded in a different order. The symbolic nature of a &#34;relocatable trace specification&#34; makes that unnecessary. 
     These principles may be extended to apply to logic state analysis performed upon target systems that incorporate memory management units. In such target systems the relocated addresses issued by the processor are virtual addresses that are further modified in real time by the memory management unit as the processor runs. The modified addresses are the actual physical addresses sent to the memory. Their values are contingent upon run time conditions reflecting what parts of memory are allocated to which programs or tasks. These allocations are dynamic, and generally cannot be given in advance as fixed absolute offsets to be applied to the relocated addresses present at run time. Those relocated address are themselves offset by some relocation base from the relocatable addresses issued by the assembler or compiler, as mentioned above. Thus, such a memory managed address involves some absolute value that results from dynamically offsetting a relocated value that is already offset by a fixed amount from the relocatable value appearing in the source listings. 
     The dynamic offsets mentioned above need not be entirely private to processes within the target system, and therefore mysterious to the logic state analyzer. The symbols representing the various dynamic offsets can be defined to the logic state analyzer. Then provided certain criteria pertaining to keeping public knowledge of the offsets current (a task specific to the nature of the target system) a logic analyzer constructed in accordance with a preferred embodiment to be described can continuously adjust during run time the &#34;real&#34; absolute trace specification to match the symbolic one entered by the user. In like fashion it also can properly insert source symbols into the trace listing, even though the trace pertains to a program whose position in memory was determined dynamically at run time. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is an idealized schematic representation of the relationship between certain programs executed as a workpiece to illustate the various operational features of the invention. 
     FIG. 2 is a simplified block diagram of a Logic State Analysis System capable of incorporating the principles of the invention. 
     FIG. 3 is a diagram illustrating the relationship between various file names resulting from the application of the Analysis System of FIG. 2 to the workpiece programs of FIG. 1. 
     FIG. 4 is a diagram relating certain kinds of information about symbols defined either by the user during debugging or in the programs being traced to various Trace, Format and Map Specifications on the one hand and an unrelocated Trace List on the other. 
     FIG. 5 is a flow chart describing the relationship in FIG. 4 between the Symbol Maps and the Trace Specification. 
     FIG. 6 is a flow chart describing the relationship in FIG. 4 between absolute values associated with the Trace List and the various Trace Symbols. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     FIG. 1 is a block diagram of the functional relationship between certain component portions of a simple computer program 1 constructed as a workpiece to illustrate the various operational aspects of the invention. The compilation and execution of the program of FIG. 1 provides an example environment within which the operation and utility of the invention is explained. Appendices A through U pertain to that explanation. Following that, the internal operation of the invention is discussed in connection with FIGS. 2 through 6. 
     Turning now to the workpiece program 1 of FIG. 1, a main program 2 and an associated subprogram 3 cooperate with a data structure 4 named &#34;DATA --  BLOCK&#34;. Both the main program 2 and the subprogram 3 are written in PASCAL, although any of a number of other programming language might have been used, as well. The name of the main program is &#34;MAIN&#34;, while the name of the subprogram 3 is &#34;FACTOR&#34;. Associated with these two Pascal programs and their data structure are three utility programs from the run-time library invoked by the PASCAL complier during compilation of the programs MAIN and FACTOR. These are a parameter passing routine 5 named PARAMETER, a multiplication routine 6 named MULTIPLY, and a routine 7 named BOOLEANIN that checks if a specified bit in a specified word is set. BOOLEANIN finds use, for example, in the evaluation of PASCAL &#34;IF&#34; statements. Each of these program elements will now be briefly considered in turn. 
     Turning now to page i of Appendix A, shown there is the PASCAL source listing of the program MAIN 2. What the program MAIN does is fill the data structure DATA --  BLOCK with the factorials of the consecutive integers zero through twenty. To do this if references an external integer array conveniently named DATA --  BLOCK. The index into the array is named INDEX, and an external function FACTORIAL returns the value n! for a supplied integer n. A simple FOR loop assigns the factorial of the value of the index to the location identified by the index. This is done for pointer values of from zero to twenty. 
     The source listing in PASCAL of the function subprogram FACTOR is shown on page i Appendix B. We shall not dwell upon what a factorial is, or upon the logical arrangement of the subprogram FACTOR 3. Programs MAIN 2 and FACTOR 3 are presented merely as portions of a workpiece in an example situation. The situation involves either verification or troubleshooting of the operation of FACTOR. More specifically, the example will involve tracing the operation of the function FACTORIAL upon a supplied value of three. We will find that this will involve such things as passing the parameter NUMBER to the function FACTORIAL (using PARAMETER), using BOOLEANIN to accomplish a portion of the IF statement on line ten, and the use of MULTIPLY in line twelve. We mention these things because it is by examining the associated portions of a trace produced by a logic state analyzer constructed in accordance with the invention that exactly what happens during such key portions of FACTORIAL can be observed. In short, the idea is to observe the input, the output and some of the important points inbetween. To briefly look ahead for a moment, why this is conventionally easier said than done will be the subject of Appendix L, and why with the aid of the invention it is as easily done as said the subject of the remaining Appendices. But for now, we must continue with the placement of our example workpiece program into the environment of an actual system so that tangible actual results can be explained and compared. 
     To continue then, page i of Appendix C is a commented assembly language program DATA --  BLOCK that satisfies the &#34;external&#34; referenced in MAIN, and provides for the storage requirements of the integer array. The operative portion of DATA --  BLOCK is line twenty-one. There a &#34;BSS 21&#34; instruction reserves twenty-one words, the first of which is associated with the symbol DATA --  BLOCK. Those familiar with assemblers will recognize that the &#34;program&#34; DATA --  BLOCK is a program in the sense that it is a text file that may be assembled, even though it does not generate any executable code. What it does do that is of interest in the present example is create a symbol table of all the assembly language labels in the program. One of those (in fact, the only one) is DATA --  BLOCK. That is of future interest. A collateral point of interest is that the &#34;BSS 21&#34; instruction nonetheless increments a program size value that later has the effect of reserving those twenty-one words by the simple expedient of making DATA --  BLOCK appear to be twenty-one words long, even though those words don&#39;t contain any code generated by the assembler. 
     To run the workpiece program 1 programs MAIN 2 and FACTOR 3 must be compiled by an appropriate PASCAL compiler and DATA --  BLOCK 4 must be assembled by an appropriate assembler (i.e., ones for the machine language of the processor in the target system that is to execute the workpiece program). Then the whole works must be relocated and loaded. The workpiece program can then be executed. During that execution a logic state analyzer can respond to the occurrence of certain predefined conditions (defined with a trace specification) to selectively trace all or only selected events (we will select all events). A format specification matches the logical constructs of &#34;address&#34;, &#34;data&#34;, and &#34;status&#34; to particular groupings of the electrical signals monitored by the logic state analyzer. The resulting trace is a record of system activity in the vicinity of conditions defined in the trace specification. In the traces that appear in the various appendices to follow the &#34;trigger event&#34; is the third item in the trace, so that the bulk of the trace shows what happened subsequent to the triggering event. But first, the programs MAIN 2 and FACTOR 3 must be compiled and loaded. Appendix C has already shown the result of assembling DATA --  BLOCK 4. 
     With this in mind, consider the expanded compiler listings of Appendices D and E produced by compiling the programs MAIN 2 and FACTOR 3. Our ultimate goal for the example under construction is to obtain a trace for the following trace specification (which we render here in plain English): &#34;Get ready to start the trace when INDEX is assigned the integer value three and then trigger the trace when the address equals FACTORIAL and status equals opcode (i.e., the first instruction in the object code for FACTORIAL is being fetched for execution).&#34; To put such a trace specification into effect one must not only translate the desired meaning into an appropriate collection of switch settings and keystrokes, etc., according to the syntactical idiosyncracies of the particular logic state analyzer at hand, but one must also supply particular (i.e., absolute) addresses and values for such things as FACTORIAL and INDEX. And should FACTOR invoke any other routines, then the user must ordinarily be prepared to translate addresses in those portions of the trace into meaningful locations in those invoked routines. To do this he would use a load map provided by the linker or relocating loader to learn which routine any such address fell within, and then study the compiler listing for that routine to follow what activity is represented by the trace. 
     In connection with these activities it will be noted that several types of items of interest appear in the listings of Appendices D and E. At the far left side of each listing and in a column labeled &#34;location&#34; is the relocatable address for each word of code emitted by the compiler. In a column labeled &#34;source line&#34; appears the line number in the original PASCAL source listing that caused the associated machine instructions. That line of source is listed, with resulting machines code shown below it. Note that symbols defined by the user in his source programming, such as INDEX at line twenty-six of page i of Appendix D (which relates to line eighteen of the PASCAL source listing of MAIN), results in code that uses the symbol INDEX. But that use of INDEX now needs an implementing definition in the context of an executable machine language program. This is done at line forty-two of page i of Appendix D, with a &#34;BSS 1&#34; whose hexadecimal relocatable address is 0010H. To carry out the planned example using a conventional logic state analyzer one must replace INDEX with the final relocated value for 0010H assigned to the compiled code for MAIN. And that is just one instance of such correspondence out of several. A similar thing needs to be done to actually specify in a conventional trace specification what is the absolute address of the first instruction executed in FACTOR. 
     As if this were not bad enough, it can easily get worse; and in our example, it does. Recall the utility programs PARAMETER 5, MULTIPLY 6 and BOOLEANIN 7. The compiler produces code that uses those routines; see the JSM instructions at lines fourteen, twenty-two and thirty-eight on page i of Appendix E. The trace that is produced in our example includes such JSM&#39;s and their associated activity. This is not unreasonable, in that if something were wrong it might be necessary to delve into the operation of these or other utility routines to understand the nature of the failure. 
     Now in some installations the utilities in the run time library might only be just so much relocatable machine code programs whose real meanings remain forever a mystery. A more civilized approach is for the run time library to contain not only the relocatable code for each utility, but also either the source itself or a text file containing the expanded compilation. If this latter were available it would make the task of following each step through a complete trace at least no more difficult than it would be if there were no such library utilities invoked by the compiler. That is to say, it becomes doable, but not necessarily easy. 
     Appendices F, G and H are the assembler listings for the three utility routines PARAMETER 5, MULTIPLY 6 and BOOLEANIN 7, respectively. The details of how those programs operate are not terribly pertinent to an understanding of the import of our example, and will be left to an investigation by the interested reader. 
     Appendix I is a load map indicating where, for the particular example under consideration, each of the user programs MAIN through DATA --  BLOCK and the library programs BOOLEANIN through MULTIPLY was loaded for execution. The column labeled &#34;PROGRAM&#34; contains the hexadecimal values at which each block of code begins. 
     Traditionally, a load map such as the one of Appendix I is a virtual necessity when tracing program flow described with relocatable listings, as the following examples pertaining to Appendices J, K and L show. Appendix J is a format specification that tells the logic analyzer which electrical lines (i.e., which probes for each of the various probe pods) are address lines, which are data lines, and which are status lines, etc. In the present example these collections are also labeled &#34;Address&#34;, &#34;Data&#34; and &#34;Status&#34;, respectively. The term used herein to refer to such symbols as &#34;Address&#34; pertaining to the address collection of signals is the noun &#34;data label.&#34; As will be described shortly data labels such as &#34;Status&#34; have associated therewith pluralities of values; there is more than one status. (These various values can be represented symbolically also, and may be arranged into symbol maps.) The format specification also identifies the electrical logic polarities and threshold levels the signals are expected to obey. Appendix K is a trace specification defining the nature of the information to be recorded by the logic state analyzer while it monitors the execution of the workpiece program. We shall turn to just what that is and why it is of interest in a moment. 
     Both Appendices J and K pertain to a logic state analyzer such as Hewlett-Packard Company&#39;s 64620S Logic State/Software Analyzer for use with the HP 64000 Logic Development System. The target system which the trace is for is one that includes a &#34;BPC&#34; (Binary Processor Chip) as the microprocessor. And although it is not particularly necessary to study the properties of the BPC to appreciate the example under construction, those interested or wishing a description of its instruction set, bus structure and internal architecture may find these described in considerable detail in U.S. Pat. No. 4,180,854. See col&#39;s 152 through approximately 200, FIGS. 44 through 132Cc. 
     To return now to the example under construction, the high level description of what the trace specification of Appendix K means is &#34;Get ready to start the trace when INDEX is assigned the integer value three and then trigger the trace when the address equals FACTORIAL and status equals opcode.&#34; To create a trace specification with such a meaning one must not only follow the proper syntactical conventions such as &#34;enable --  after&#34; and &#34;on Address&#34;, but one must also correctly supply certain definite values: &#34;enable --  after Address=???&#34; That is, the user has to come up with the &#34;8012H&#34; in line two of Appendix K. In this particular example the &#34;8012H&#34; is found by noticing that MAIN is loaded beginning at 8002H and that INDEX is at 10H (relocatable) in MAIN: 8002H plus 10H equals 8012H. And while this is not a formidable task in itself, such arithmetic may be needed in numerous places when interpreting the trace, so that following the flow of the program listing through the trace is rather like being nibbled to death by mice. Nor would it necessarily do any good to commit 8002H to memory and learn to add and substract by sight in hexadecimal. For as soon as any changes are made to the programs (which might happen many times during the course of a major project) there would appear new relocatable addresses which would likely be relative to entirely different relocation bases. 
     That then, is the general situation pertaining to Appendix L, which is an abbreviated rendition of the trace obtained in accordance with Appendices J and K for the programs of Appendices A through H and the load map of Appendix I. 
     Let us now briefly consider a portion of Appendix L. Notice that at line &#34;trigger&#34; on page i of Appendix L there occurs &#34;08013 LDA 8030&#34;. According to the load map of Appendix I address 8013H is the start of the program FACTOR. At line +004 there is a &#34;JSM 806D&#34;, followed by a change of address to 806DH at line +006. Looking only at the trace of Appendix L does not answer the question &#34;What is 806DH?&#34; If this JSM were of interest, what would one do to answer that question is to first notice by an inspection of the load map (Appendix I) that 806DH falls between 8069H and 808FH, so that the absolute address 806DH refers to something in PARAMETER. The load base for PARAMETER is 8069H. The referenced location minus the load base is 0004H, which is a relocatable location in PARAMETER. Now by looking at line forty-nine in the assembler listing for PARAMETER (page ii of Appendix F), notice that (relocatable) location 0004H is assigned the label PARAMETER --  ENTRY. Therefore, &#34;JSM 806D&#34; is really &#34;JSM PARAMETER --  ENTRY.&#34; 
     Similar analyses apply to other address changes (JMP&#39;s, JSM&#39;s, etc.) and any associated RET&#39;s. Various such instances can be located in Appendix L, although for the sake of brevity we shall content ourselves with the one given concerning 806DH. We shall have occasion to use that instance again to illustrate the utility of the invention. It is to that illustration which we now turn our attention. 
     An additional &#34;map specification&#34; supplied to the logic state analyzer by the user, done at generally the same time as the user supplies the format and trace specifications, allows the analyzer to perform the relocation needed for symbolic trace specification, as well as the &#34;un-relocation&#34; needed for creation of the symbolic trace listing. Appendix M contains such a map specification having two symbol maps, each of which relates various symbols to a single value or range of values. A single value may be uniquely specified in any base, or may also be non-uniquely specified in any base by the inclusion of &#34;don&#39;t care&#34; characters. These values are absolute, and are obtained either from a load map or from abolute listings. 
     In the general case the map specification may contain a collection of one or more such symbol maps. The reason that more than one symbol map may be needed is that the symbols generally represent logically disjoint phenomenea such as &#34;address&#34; and &#34;status.&#34; For example, in the case of the BPC microprocessor mentioned earlier, an address of zero represents the A register while a status of zero (for a given choice of how to group certain control lines) represents a memory write cycle. It is this possibility of separate and independent meanings for the same value that requires partitioning of the various types of symbols into separate collections. These collections generally reflect the functional division of labor exhibited by the various signals going to and from the processor. However, it is not absolutely necessary that the actual electrical signals themselves be disjoint; what is required is logical independence. In the BPC, for example, the address and data lines are one and the same, but the different types of information occur at different times. A property called &#34;clock qualification&#34;  (which is explained in U.S. Pat. No. 4,338,677, issued to Morrill on July 6, 1982) provides the ability for a logic state analyzer to demultiplex logically separate but electrically common entitles in such situations. 
     Referring specifically now to Appendix M, at line six the symbol FACTORIAL is defined as the single unique absolute value 8013H. At line seven the symbol Z is defined as the range of absolute values 22H through 0C2H. Any value falling within that range will appear in the trace listing as a value relative to some reference location which itself may or may not actually be within the range. (The reference locations which usually have the greatest utility are the start of the range, the end of the range, and zero. But other values are at least conceivable, and such values are allowed and implemented.) Values within Z, for instance, will appear in the trace listing as the symbol Z plus or minus an offset, where the offset is relative to 42H. This feature is useful in instances where the symbol represents a compiler heap or perhaps an array, neither or whose indices are zero. 
     At line eight of Appendix M the symbol MAIN is defined as the absolute range 8002H through 8012H, relative to the start of the range. At line fourteen the symbol STACK is defined as the absolute range 0F9F0H through 0FA17H, relative to the end of the range. 
     And finally, at line 31 the symbol Error is defined as the nonunique value 1XXXB. Any value in the range 1000 binary to 1111 binary will appear in the trace listing as simply the symbol Error. 
     In a preferred embodiment the map specification may be entered in either of two ways. In the first way the user gathers the relevant information provided by various software tools (assemblers, compilers, linkers, etc., some of which may run on disparate equipment in various locations other than the target system) and then constructs a table of information corresponding to the desired map specification. He then keys this information into the logic analyzer. For example, in a microprocessor controlled logic analyzer, such as the HP 64620S, he may use a series of keystrokes similar to the ones of the entry example shown in Appendix M. These amount to syntaxes for manual entry of the map specification. A second way of entering the map specification involves the user&#39;s preparation of a properly formatted table or tables of information within a file on some mass storage medium. The map specification may then be communicated to the analyzer by mounting that disc or tape into a drive therein and instructing the analyzer by a suitable syntax to read that file to obtain the map specification. Alternatively, the file could be transmitted over a suitable data link, such as RS-232 or IEEE 488. 
     In conjunction with the addition of a map specification, an alteration to the associated format specification is desirable. The changed format specification is shown in Appendix N, which differs somewhat from the earlier form specification found in Appendix J. The differences appear at lines fifteen, twenty-six, and thirty-seven. The import of line fifteen is that a default symbol map for the data label Address is a symbol map named Address --  symbols. There might be other appropriate symbol maps with other names, and one of those could be specified in place of Address --  symbols if that were desirable. The same general situation exists for the status map. At line thirty-seven the associated default map is identified to be one named Stat --  map. There might well exist different status maps having different names. And at line twenty-six the existence of a default data map is denied. Absence of any such map means that data values are represented in the trace listing simply as their absolute values. (In the present example the base for such absolute values defaults to hexadecimal in the absence of any specification to the contrary.) Finally, note that these default map definitions in the format specification merely select which symbol maps to use if the default situation is actually achieved. Some particular symbol maps may be specified (&#34;somewhere else&#34;), in which case the default condition does not obtain. That &#34;somewhere else&#34; is in a trace specification, which is also now somewhat different than it was, as, say, in Appendix K. 
     Turning now to Appendix O, the modified trace specification is shown; it uses symbols to accomplish the same measurement as specified in Appendix K. It mentions no symbol maps, however, so the default choices of Appendix N are invoked. Also shown in Appendix O is another (entirely separate) sample trace specification that would produce an entirely separate measurement. It is included because it does mention a symbol map, which overrides the default choice specified for the given data label in the format specification. The point is that the actual invoking of a symbol map specification (whether explicitly or by default) occurs in the modified trace specification. 
     Now compare the resulting (but abbreviated) trace list appearing in Appendix P, pages i and ii, with the conventional trace list appearing in Appendix L. In particular, compare line +004 of Appendix L with line +004 of Appendix P. While in the former the disassembled instruction was rendered &#34;JSM 806D&#34;, in the latter it appears as &#34;JSM PARAMETER+0004.&#34; The &#34;PARAMTER+0004&#34; represents the relocatable location in the file named PARAMETER corresponding to the symbol &#34;PARAMETER ENTRY&#34; that appears in the source program for the parameter passing routine 5. In this case the map specification of Appendix M does not include the symbol PARAMETER --  ENTRY, so all references to values within the range 8069H through 808EH are &#34;demapped&#34; to values relative to the start of that range. Both the absolute value 806DH and the symbol PARAMETER --  ENTRY are the fourth location the that range. 
     Refer again to the map specification of Appendix M. Notice that the symbol FACTORIAL is defined as the absolute value 8013H, and that the symbol FACTOR is defined as the range 8013H through 8038H. Observe that FACTORIAL is thus a value within FACTOR. Now observe the &#34;trigger&#34; line on page i of Appendix P. The particular value defined as FACTORIAL is rendered as FACTORIAL rather than as a value relative to the start of the range FACTOR, as occurs in, say, lines +001 through +005. 
     Notice also on page i of Appendix P that at lines +066 and +077  occur demapped references to the range Z that lie on opposite sides of the reference location 42H. Line +075 illustrates a reference to STACK demapped relative to the end of its defined range of OF9OFH through OFA17H. 
     Now compare lines &#34;trigger&#34; through +005, +066, +075 and +077 of Appendix P to those same lines in Appendix L. It is abundantly clear that the trace listing of Appendix P is considerably easier to use. Notice further that a casual perusal of the conventional trace listing of Appendix L gives no sense of overall program flow; the instructions themselves have been disassembled, but the operands and address remain just so many numbers whose connection to the symbols of the source programming is obscure. The trace listing of Appendix P is in distinct contrast in that it is obvious that from lines +065 through +074 that the trace concerns program execution in the utility program BOOLEANIN 7, after which program execution transfers to a range labeled FACTOR, whose limits are known to correspond to the extent of the executable code for to the user written subprogram FACTOR 3. 
     The improved trace listing of Appendix P is possible, in part, through the agency of the map specification in Appendix M. However, that particular map specification, while providing a definite improvement, still required a modest amount of additional effort on the part of the user. That is, he still had to key in the names of the various symbols and their values. That is in contrast with the circumstances surrounding Appendix Q. 
     Referring again briefly to Appendix I, notice that one of the pieces of information concerning the listing output from the linker (i.e., the &#34;load map&#34;) appears in line eighteen as &#34;absolute &amp; link --  com file name=WORKPIECE:EXAMPL&#34;. What this means is that a related file specified as &#34;WORKPIECE:EXAMPL:link --  sym&#34; includes, among other things, &#34;range records&#34; of named &#34;user segments&#34; and their associated start and end locations in memory. The names of the user segments are the same as the file names of the various program segments to be linked and loaded. 
     Returning now to Appendix Q, consider a command such as: 
     
         &#34; . . . define link.sub.-- sym film WORKPIECE:EXAMPL . . . &#34; 
    
     This command would be issued by the user as part of the map specification and in lieu of keying in the names of the symbols and their ranges. The &#34; . . . define . . . &#34; command itself is not shown as part of Appendix Q; what is shown is the result of issuing that command. That result is the &#34;linked --  files&#34; information of lines twenty-five through thirty-four of Appendix Q. This makes some extra information part of the map specification compared to what was available in Appendix M. The extra information is that both start and end values for the range of a symbol are provided. By this means it will later be possible in the trace listing to indicate that an address or operand is outside any such range by the simple expedient of rendering it is an absolute value, while those that are within such a range are rendered as either a specific unique symbol or as relative to the particular symbol associated with that range. 
     Before examining the resulting trace list for this newest example, a somewhat different trace specification must also be considered. The user, at this point, would think of the trace specification in terms of the symbols INDEX and FACTORIAL. But the new map specification of Appendix Q does not explicitly show those symbols, although the information is implicity present. That is, the symbol INDEX is declared to be global in the file named MAIN:EXAMPL (see line forty-four of Appendix D) and the symbol FACTORIAL is declared to be a global function in the file named FACTOR:EXAMPL (see line fifty-five Appendix E). This implicit connection is made explicit by associating in the trace specification the file name MAIN:EXAMPL with the symbol INDEX and the file name FACTOR:EXAMPL with the symbol FACTORIAL. See lines two and four of Appendix R. 
     Now consider the resulting trace list, shown in pages i and ii of Appendix S. First, observe the by now familiar example of line +004. That line of the trace is now rendered as: &#34;FACTOR+00002 JSM PARAMETER --  ENTRY, PARAMETER . . . .&#34; The difference between line +004 of Appendix S and line +004  of Appendix P is that the operand of the JSM instruction is now rendered as PARAMETER --  ENTRY rather than as merely PARAMETER+0004. This is based on inspection of a file produced upon the assembly of PARAMETER:EXAMPL. (The actual complete specification of that file is PARAMETER:EXAMPL:asmb --  sym. This reflects a &#34;file name:user id:file type&#34; convention employed by the Operating System used to manage files and run the compiler, assembler and linker, etc.) The &#34;,PARAMETER&#34; following the operand of the JSM refers to the complete file specification; it identifies the file used to produce the symbolic rendition of the JSM&#39;s operand. But since the display may be limited to eighty columns, and since the user can be expected to appreciate any such &#34;name:user id:type&#34; conventions, supplying only the name portion is a generally adequate compromise. 
     In a trace list such as in Appendices P and S the &#34;direction of look up&#34; is from the absolute value in hand (that came from the state analyzer) to the symbol (found in some file used by the linker). Owing to the more comprehensive nature of the information in the file WORKPIECE:EXAMPL that was incorporated into the map specification for the trace list of Appendix S, look up operations to find the absolute value of a symbol can be performed for all addresses and operands. See for example, line +006 in Appendix S. It is rendered as: 
     
         &#34; . . . PARAMETER.sub.-- ENTRY, STA DOPEVECTOR, PARAMETER . . . &#34; 
    
     rather than as merely: 
     
         &#34; . . . PARAMETER+00004 STA PARAMETER+0000 . . . &#34;. 
    
     Once the ability to inspect source files for symbol names is at hand, as described in connection with Appendix S, it is also possible to include in the trace listing those original source program line numbers that produced the run time activity captured by the trace. In Appendix T, for example, we see that lines &#34;trigger&#34; through +004 are associated with line #8 of the source program. Such associations are limited to source lines that were compiled; assembled source lines are already in general one-to-one correspondence with the trace listing, owing to their word-by-word or byte-by-byte nature and the similarity of that nature to the executable object code. 
     Appendix T is the same trace listing as before with the addition of such source line numbers. For example, at line -002 of Appendix T we see the notation: 
     
         &#34; . . . #18 MAIN00.sub.-- L2,MAIN JSM . . . &#34; 
    
     What this means is that at line eighteen of some source programming in a file named MAIN the compiler generated a label MAIN00 --  L2 and emitted an executable instruction JSM, etc. The next executable instruction came from a source in a file named FACTOR, and so on. 
     Now consider Appendix U. Therein is a complete trace listing for the trace specification of the example used throughout this discussion. Not only are the line numbers included, but one copy of each associated source line is also included at the start of each block of different source line numbers. 
     Referring now to FIG. 2, shown there is a simplified block diagram of an environment within which the invention may be practiced. That environment may include either or both a Logic State Analyzer and an Emulator. As shown in FIG. 2 a Logic State Analyzer Module 8 and an Emulator Module 9 are installed into, cooperate with and are supported by a Host System 10. For example, the Host System 10 could be an HP 64000, the Logic State Analyzer Module 8 an HP 64620S, and the Emulator Mode 9 any of various HP 642XX used in conjunction with an HP 64304 Emulation Bus Preprocessor. The Emulation Bus Preprocessor corresponds generally to switching elements 13 and 14. 
     As shown in FIG. 2 the Logic State Analyzer Module 8 can receive data either from Probe Pods 11 and 12 connected to a Target System 13 under test or from the Emulator Module 9. The invention operates upon the data received by the Logic State Analyzer Module 8 in either case. To facilitate this the Logic State Analyzer Module 8 incorporates switching or multiplexing elements 13 and 14. 
     In a preferred embodiment the Host System 10 controls the operation of both the Emulator Module 9 (if it is present) and the Logic State Analyzer Module 8. To this end an Operating System including various suitable commands is encoded in a System Rom 15 and executed by a Microprocessor 17. This control would involve interaction with the user through a Keyboard 18 and a Display 19, and may involve such notions as &#34;soft keys,&#34; &#34;soft front panels,&#34; &#34;directed syntax,&#34; etc. If a mass storage device 20 is present then command files to establish certain commonly used set-ups may be saved in labeled command files to be recalled and invoked at will. Likewise, the results of various measurements can be stored for later analysis and comparison. 
     The control of the Emulator and Logic Analyzer Modules 9 and 8 involves the preparation of a variety of tables of information, some of which are retained in an area of System RAM 16 and some of which are in distributed addressable locations in the Modules 8 and 9. These distributed locations are responsive to memory cycles upon a Microprocessor Address/Data Bus 21 initiated by the Microprocessor 17. By this means a Trigger Recognizer 23 and a Storage Recognizer 24 can be individually and selectively programmed by the user to accomplish their appropriate recognition tasks for a given measurement. Those tasks ultimately result in state data upon Target State Bus 26 being stored in a Trace Memory 25. This is the raw data of a trace listing that is to be formatted as described in any of Appendices P, S, T and V. 
     Such formatting is in part, accomplished in the preferred embodiment of FIG. 2 by various routines executed by the Operating System encoded in the System ROM 15 of the Host System 10. This involves inspection of various tables and files of information which may be variously found either in the System RAM 16 and the Mass Memory 20. Much of this needed information is generated, as previously described, by the user as he applies the various software tools to compile, assemble link and load the various programs and data structures that become the object of the trace listing. We now turn to just what that information is and how it is used to produce trace listings of the sort depicted in Appendices P, S, T and U. 
     FIG. 3 is a schematic arrangement of various files of interest that are created in the course of generating, loading and executing the workpiece example program of FIG. 1. The Appendix section associated with certain of these files is also indicated. In view of all of the various explanations offered to this point it is believed that an extended explanation of FIG. 3 is not needed and that the Figure speaks for itself. It is a useful diagram, however, as it clearly sets forth the relationships between a multitude of files in which we are interested. 
     FIG. 4 is a schematic arrangement of particular types of data that are of interest in the creation of the unrelocated listings of Appendices P, S, T and U, as well as the application of the associated trace, format and map specifications. Specifically the Captured Data 27 is what the Logic State Analyzer Module 8 would store in the Trace Memory 25. That is the raw information that is to be operated upon to make it as useful to and as easily interpreted by the user as possible. 
     That, in turn, is accomplished by properly interpreting certain Trace Symbols 32 which may be classed as either Software Symbols 28 or Analysis Symbols 29. The Software Symbols 28 are simply those symbols appearing in the various source programs, and that are &#34;passed through&#34; by compilation and assembly. Analysis Symbols 29 are those symbols someone operating the Logic State Analyzer Module will need to bring to the problem, over and above what is already defined in the programming. Examples are the Data Labels that are associated with particular target system signal lines of interest and that can experience various values. For example, three lines might be called Status, and might have various absolute values meaning read, write, instruction fetch, etc. The various Data Labels may be associated with maps wherein the different values are given symbolic names. In addition, the person conducting the analysis can include definitions of symbols of interest solely for the analysis of the particular programming whose execution is being traced, and that would have to be added to the source if they could not be added to the symbol maps. Adding them to the symbol maps saves having to edit, recompile, reassemble, and reload. 
     The Data Labels 30 are defined through the Format Specification 34, while the Symbol Maps 31 are defined through the Map Specification 33. Once those two specifications are made any symbol that is either a Software Symbol 28 or an Analysis Symbol 29 can be used in the Trace Specification 35, and may subsequently appear in the unrelocated Trace List 36. Hence, the union of the Software Symbols 28 and the Analysis Symbols 29 is referred to as Trace Symbols 32. 
     FIG. 5 is a flow chart of a process for replacing a Software Symbol 28 in a Trace Specification 35 with the corresponding absolute address. The flow chart is believed to be self-explanatory. Of course, Analysis Symbols 29 can be also be included in a Trace Specification 35, but their absolute values are obtained from inspection of an associated Symbol Map 31. A flow chart for that has been omitted. 
     FIG. 6 is a flow chart of a process for removing an absolute value in a conventional trace list produced by a logic state analyzer and replacing that absolute value with a symbol in accordance with the various Trace Symbols of FIG. 4. The flow chart shows how and where to look for the various types of symbols that may be defined, as is believed to speak for itself. Note that if the user specifies a symbol in a Symbol Map whose associated absolute value has another symbol associated therewith from the collection of Software Symbols, the Analysis Symbol is the one used in the Trace List. The net effect of this is to allow the user to rename a Software Symbol during the debugging process without editing any source programs and without any recompiling, reassembling, and reloading. 
     The following remarks apply to trace lists including source line numbers and source lines, such as appearing in Appendices T and U, respectively. Line numbers are generated by the compiler and appear in the :asmb --  sym file. A line appears in the listing as if it were a symbol, generally in its own column, and maybe extracted by an algorithm similar to that of the flow chart in FIG. 6. In particular, a minor change in connection with the &#34;yes&#34; path through decision 32 requires that processes 38 and 39 be adjusted to provide line numbers when required. And in the case where source lines themselves are also desired, process 30 also supplies the source line. 
     The following remarks apply to instances where the invention is used in conjunction with Target Systems incorporating a Memory Management Unit (MMU). In such a system the MMU intercepts the memory bus between the processor and the memory. If the logic analyzer&#39;s address probes are connected to the virtual address existing between the processor and the MMU then no special considerations are required; the presence of the MMU is not discernable. 
     However, some special actions are generally required in the case where the address probes are connected to the physical address existing between the MMU and the memory. First, the MMU generally will adjust the address of memory cycles according to an amount determined or selected by the Operating System. That amount might be the contents of some addressable register. The logic analyzer would need to monitor any write operations to that register to learn the instructions being passed to the MMU. Second, there is an alteration in the relationship of FIG. 4 for the mapping between the absolute values of the raw trace information and the available Trace Symbols and the mapping in the other direction between the symbols used in the various Trace, Format and Map Specifications and their associated absolute values. In the case of the first mappings mentioned above an associated presubtraction is applied to the physical address, which is then used as before. The value that is subtracted is associated with the instructions sent to the MMU and that are monitored by the Logic Analyzer. In the case of the mappings in the other direction a post-addition is applied to the resulting absolute value to produce the actual physical memory location. As before, the amount added would correspond to previous instructions supplied to the MMU and monitored by the Logic Analyzer. 
     Another way to use the invention pertains to circumstances where a file in the Mass Memory 20 of FIG. 2 contains an image of a trace that might have at one time been in the Trace Memory 25. Such a file of a trace need not have even originated with the Logic State Analyzer Module 8; the data therein may have been gathered under entirely different circumstances and arrived at the Mass Memory 20 by any of a number of convenient means, including a removable recording medium and transmission over suitable data links. Once in the Mass Memory 20, such a file may be operated upon by the invention as if it actually came from the Trace Memory 25. 
     
                       TABLE I______________________________________Index to the AppendicesAPPENDIX DESCRIPTION______________________________________A        MAIN sourceB        FACTOR SourceC        DATA --BLOCK assembly listingD        MAIN expanded compiler listingE        FACTOR expanded compiler listingF        PARAMETER assembly listingG        MULTIPLY assembly listingH        BOOLEANIN assembly listingI        Linker Load MapJ        Format SpecificationK        Conventional Trace SpecificationL        Conventional Trace ListM        Map SpecificationN        Format Specification with Default mapO        Trace Specification with Analysis SymbolsP        Trace List with Analysis SymbolsQ        Map Specification with Software SymbolsR        Trace Specification with Trace SymbolsS        Trace List with Trace SymbolsT        Trace List with source line numbers and Trace    SymbolsU        Full Trace List with source lines and Trace    Symbols______________________________________ ##SPC1##