Figure 4-1 shows the Event Table.
The top area of the Event Table is the event list--a scrollable region in which events are listed. When you execute the program, Prism uses the events in this list to control execution. Each event is listed in a format in which you could type it as a command in the command window. It is prefaced by an ID number assigned by Prism. For example, in Figure 4-1, the events have been assigned the IDs 1 and 2.
The middle area of the Event Table is a series of fields that you fill in when editing or adding an event; only a subset of the fields is relevant to any one event. The fields are:
ID - This is an identification number associated with the event. You cannot edit this field.
Location - Use this field to specify the location in the program at which the event is to take place. Use the syntax "filename":line-number to identify the source file and the line within this file. If you just specify the line number, Prism uses the current file. There are also three keywords you can use in this field:
Use eachline to specify that the event is to take place at each line of the program; this is the default.
Watch - Use this field to specify a variable or expression whose value(s) are to be watched; the event takes place if the value of the variable or expression changes. (If the variable is an array or a parallel variable, the event takes place if the value of any element changes.) This slows execution considerably.
Actions - Use this field to specify the action(s) associated with the event. The actions can be most Prism commands; separate multiple commands with semicolons. (The commands that you can't include in the Actions field are attach, core, detach, load, return, run, and step.)
Condition - Use this field to specify a logical condition that must be met if the event is to take place. The logical condition can be any language expression that evaluates to true or false. See " Writing Expressions in Prism" for more information about writing expressions in Prism. Specifying a condition slows execution considerably, unless you also specify a location at which the condition is to be checked.
After - Use this field to specify how many times a triggering condition is to be met (for example, how often a program location is reached) before the event is to take place. The Event Table updates during execution to show the current count (that is, how many times are left for the triggering condition to be met before the event is to take place). Once the event takes place, the count is reset to the original value. The default setting is 1, and the event takes place each time the condition is met. See " Overview of Events" for a discussion of triggering conditions.
Stop - Use this field to specify whether or not the event is to halt execution of the program. Putting a y in this field creates a breakpoint event; putting an n in this field creates a trace event.
Inst - Use this field to specify whether to display a disassembled assembly-language instruction when the event occurs.
Silent - Use this field to specify whether or not the event is to cause a message to appear in the command window when it occurs.
Enabled - Use this field to specify whether the event is enabled. Putting an n in this field disables the event; it still exists, but it does not affect program execution.
The buttons beneath these fields are for use in creating and deleting events, and are described below.
The area headed Common Events contains buttons that provide shortcuts for creating certain standard events.
Click on Close or press the Esc key to cancel the Event Table window.