Heading:qjk40(635) Mesa 6.0 Debugger Updatey756qjk40\b24B Page Numbers: Yes X: 527 Y: 10.5"qjk40 Copyright c Xerox Corporation 1980z18592l4445y45c\10f3 1f0 Inter-Office Memorandumz18592l4445y762\f5b To Mesa Users Date October 27, 1980z18592l4445d2998e21(0,65535)(1,4445)(5,11684)(6,14146)\f7 2f0t2 1t0 10t6 1f7t0 4f0t7 1t0 From Bruce Malasky, John Wick Location Palo Altoz18592l4445d2998y716e25\f7 4f0t2 1t0 24t6 1f7t0 8f0t7 1t0 Subject Mesa 6.0 Debugger Update Organization SDD/SS/Mesaz18592l4445d2998e25\f7 7f0t2 1t0b17t6 7B1f7t0 12f0t7 1t0 XEROX z18592l508y644e14(2116)\f2 5f0 Filed on: [Iris]Doc>Debugger60.bravo (and .press) e30(0,16263)(1,65535)(5,65535)(6,65535)\f7 55f0 x2e12(2116) This memo outlines changes made in the Mesa Debugger since the last release (Mesa 5.0, April 9, 1979); it is intended as a concise guide to conversion, not a detailed specification of the changes. Complete documentation on the Mesa 6.0 Debugger can be found in the Mesa Debugger Documentation.x2e12jk40\266i27I User Interfacex2e18jk80\b14B The Debugger's user interface incorporates changes made in Tajo (the Tools Environment); the window package Wisk has been converted to use Vista, the new window package. For more complete documentation on the Tajo design, see the Tajo User's Guide and the Tajo Functional Specification.z18556x2e12jk40(635)\108f6b4f0B27f6b5f0B87i17I9i29I Typeinx2e12jk60(1799)\i6I The assignment of some function keys and mouse buttons has changed. The menu button is now YELLOW (formerly BLUE). FL4 is no longer the stuff key; use FR4 (Spare2), Keyset2, or ^S. The following function keys are implemented (see the section on editing for an explanation of the functions):x2e12jk40\92f7 6f0 11f7 4f0 4f7 3f0 33f7 3f0 2f7 6f0 3f7 7f0 5f7 2f0 Function ADL Keyboard Microswitch Keyboard Keyset Control Keyl4269x2e12jk40(0,6944)(1,10096)(2,14207)(3,15968)\u8U1u12U1u20U1u6U1u11U Cut DEL DEL Keyset5 ^C Paste LF LF Keyset1 ^F Next FL3 (none) Keyset3 ^N Replace FL4 (none) Keyset4 ^R Swat FR1 Spare3 (none) (none) Stuff FR4 Spare2 Keyset2 ^S Back Word BW Spare1 (none) ^W Replace/Next FR5 (none) (none) ^Kl4269x2e6jk40(0,7862)(1,11136)(2,14208)(3,16752)\f8 3f0 1f7 3f0 1f7 3f0 1f7 10f0 1f8 5f0 1f7 2f0 1f7 2f0 1f7 10f0 1f8 4f0 1f7 3f0 8f7 10f0 1f8 7f0 1f7 3f0 8f7 10f0 1f8 4f0 1f7 3f0 1f7 6f0 7f7 1f0 7f8 5f0 1f7 3f0 1f7 6f0 1f7 10f0 1f8 9f0 1f7 2f0 1f7 6f0 7f7 3f0 1f8 12f0 1f7 3f0 14f7 3f0 Typein is directed to the Debugger if the cursor is not in any window. Source windows will accept input until a file is loaded; they then direct typein to the Debugger (unless they are editable; see below).x2e12jk40(1799) Selectionsx2e12jk80\i10I The selection scheme has changed. Clicking RED once selects a character, clicking twice selects a word, three times a line, etc. The selection can be extended to the left or right with BLUE; a character selection is extended by characters, a word selection by words, and so on. The current selection is now video reversed.x2e12jk40\44f7 3f0 140f7 4f0 Scrollbarsx2e12jk60\i10I Scrollbars no longer occupy a dedicated part of the window, but instead come up on top of the left edge. They are twice as wide as before, and you can "see through" them. To obtain a scroll bar, move left just past the edge of the window, then move right slightly, back into the window.x2e12jk40 Name Stripex2e12jk60\i11I The name stripe and tiny windows now video reverse when the cursor is in the sections that function as accelerators for the window manager menu commands (Move, Grow, Size, Top, Bottom, and Zoom).x2e12jk40\154f8 4f0 2f8 4f0 2f8 4f0 2f8 3f0 2f8 6f0 6f8 4f0 Menusx2e12jk60\i5I Except for the change from BLUE to YELLOW, the way menus are invoked has not changed. However, some new menus and commands have been added.x2e12jk40\27f7 4f0 4f7 6f0 Standard Menusx2e12jk60\i14I In addition to Move, Grow, Size, Top, Bottom, and Zoom, the standard window manager menu now also includes the following command:x2e12jk40\15f8 4f0 2f8 4f0 2f8 4f0 2f8 3f0 2f8 6f0 6f8 4f0 Deactivatel4269x2e12jk60\f8 10f0 This command deactivates the selected window; it will no longer appear on the screen and the resources used by it will be freed. The window's name is added to a menu of deactivated windows, which is available outside all windows. The window may be made active again by selecting its menu item.l4269x2e6jk40 A new Text Ops menu is now supplied with the Debug.log and source windows in addition to the Window Manager menu. It contains Find, Position, Split, Normalize Insertion, Normalize Selection, and Wrap; the following commands are new:x2e12jk40\6i9I30f8 9f0 73f8 4f0 2f8 8f0 2f8 5f0 2f8 19f0 2f8 19f0 6f8 4f0 Splitl4269x2e12jk60\f8 5f0 The Debugger's wisk window has been replaced by the more general Split window command. Feedback is similar to that in Laurel: the split line can be picked up using RED and moved vertically. The subwindow is destroyed by moving the split line off the top or bottom of the (sub)window.l4269x2e6jk40\65f8 5f0 95f7 3f0 Normalize Insertionl4269x2e12jk60\f8 19f0 For windows containing an insert point (Debug.log and editable source windows), this command will position the text in the (sub)window so that the line containing the insert point is at the top.l4269x2e6jk40\40f8 9f0 Normalize Selectionl4269x2e12jk60\f8 19f0 This command positions the text in the (sub)window so that the line containing the left most position of the current selection is at the top.l4269x2e6jk70\141b Debugger Menux2e12jk60\i13I A separate Debugger menu no longer exists; the Alter Bitmap function has been deleted, Move Boundary has been superseded by Split (see above), and Stuff It is now available only on the keyboard.x2e12jk40\11i8I28f8 12f0 28f8 13f0 24f8 5f0 18f8 8f0 Source Menusx2e12jk60\i12I In addition to the standard menus, the source window has two additional menus, Source Ops and File Ops. The Source Ops menu contains the following commands, which are unchanged: Create, Destroy, SetBreak, SetTrace, and ClearBreak; the last three commands are available only if a file has been loaded into the window. The Source Ops menu contains the following new command:x2e12jk40\79i10I5i8I7i10I60f8 6f0 2f8 7f0 2f8 8f0 2f8 8f0 6f8 10f0 93i10I Attachl4269x2e12jk60\f8 6f0 Causes the Debugger to ignore the creation date of the current source file when setting breakpoints or positioning to a source line. This command is essentially a LOOPHOLE; because the source-object correspondence may not be correct, it should be used with caution. If, after using Attach, the Debugger sets breakpoints in strange places, chances are that the source file does not match the version of the object in the system you are debugging.l4269x2e6jk40\164f7 8f0 2i91I19f8 6f0 The File Ops menu includes the following new commands (plus Load, which functions as before):x2e12jk40\4i8I48f8 4f0 Editl4269x2e12jk60\f8 4f0 Enables editing of the currently loaded read only file (see below). Empty windows are always editable, but because they have no backing store (until they are Saved or Stored on a file), the amount of information in the window should be kept small.l4269x2e6jk40\159f8 4f0 5f8 5f0 Savel4269x2e12jk60\f8 4f0 Outputs the contents of the window to its current file; overwriting the file requires confirmation. A backup "$" file is created that is a copy of the unedited version. After the Save command completes, access reverts to read only.l4269x2e6jk40\181f8 4f0 Storel4269x2e12jk60\f8 5f0 Outputs the contents of the window to the file named by the current selection; if the file already exists, overwriting it requires confirmation. After the Store command completes, access reverts to read only.l4269x2e6jk40\156f8 5f0 Resetl4269x2e12jk60\f8 5f0 Discards all edits that have been made to the window (during this session) and resets access to read only. If the file is not editable, the window is made empty.l4269x2e6jk40 The Edit command is available only if a file has been associated with the window (by a previous Load, Store, or Save); Store and Save apply only if the window has been edited.x2e12jk40(2116)\4f8 4f0 88f8 4f0 2f8 5f0 5f8 4f0 3f8 5f0 5f8 4f0 Editingx2e12jk60\i The standard source window facilities now provide a simple cut and paste editor. Editing is modeless and is accomplished by moving the insert point and typing the desired text. (Note that unlike Bravo, the insert point is independent of the location of the current selection.) Backspace and backword functions (BS and BW) are always available. The following functions are provided:x2e12jk40\314f7 2f0 5f7 2f0 ^RED Moves the insert point (represented by a blinking caret) to the cursor position.l7584d4268x2e18jk80(0,7584)(1,65535)(2,65535)(3,65535)\f7 4f0 DEL (Keyset5) ^C Cut deletes the current selection and puts the deleted text in the TrashBin (see LF).l7584d4268x2e5jk40\f7 16f0 1f6 3f0 78f7 2f0 LF (Keyset1) ^F Paste inserts the TrashBin at the insert point (see DEL).l7584d4268x2e5jk40\f7 15f0 1f6 5f0 47f7 3f0 FL4 (Keyset4) ^R Replace does a cut and moves the insert point to the place where the text was deleted.l7584d4268x2e5jk40\f7 16f0 1f6 7f0 FR4 (Spare2) ^S Stuff inserts the current selection at the insert point.l7584d4268x2e5jk40\f7 15f0 1f6 5f0 The message Please terminate editing of appears in the Debug.log if you try to Kill or Quit from the Debugger while editing a file.x2e18jk40(2116)\12f8 28f0 26f8 9f0 15f8 4f0 4f8 4f0 Caution: The editing facilities are designed not to alter the original file until it is Saved or Stored, much like Bravo; the original contents are copied to a file with "$" appended to its name. This is however, a new facility and should be used with caution. It is designed to support a moderate number of localized changes to programs, not to replace your favorite document creation system.x2e18jk40\b7B82f8 5f0 4f8 6f0 Debugger Commandsx2e18jk80\b Changes in Debugger commands are relatively minor. The Debugger's interpreter is more generally available and more consistent with the language. Tracepoints have been re-implemented as a minor extension of the standard breakpoint facilities.x2e12jk40(1799) Old Commandsx2e12jk80(2116)\i Ascii/Octal Readx2e12jk60\f8 16f0i The Ascii and Octal Read commands no longer automatically increment the default value produced by ESC.x2e6jk40(1799)\4f8 5f0 5f8 10f0 74f7 3f0 Break/Trace Pointsx2e12jk60(2116)\f8 18f0i Break and trace points can no longer be set by typing a source line, and the Break Module and Break Procedure commands and corresponding Trace and Clear commands have been deleted; the menu commands must be used.x2e6jk40(1799)\77f8 12f0 5f8 15f0 28f8 5f0 5f8 5f0 The distinction between trace and breakpoints has been removed. An optional command string can now be attached to each breakpoint which will be executed when the breakpoint is taken. A tracepoint then becomes a breakpoint with a standard default command string. LIst Breaks lists both break and tracepoints (List Traces has been deleted). Clear All Entries/Xits clears both break and tracepoints.x2e6jk40\264f8 12f0 35f8 11f0 19f8 24f0 Tracepoints automatically invoke the normal Display Stack command processor (with subcommand p(arameters), v(ariables), or r(esults) as appropriate). The q(uit) subcommand (not b(reak)) exits to the Debugger's command level, where the normal Proceed command continues execution of the client.x2e6jk40\44f8 13f0 36f8 27f0 3f8 9f0 15f8 1f0 7f8 6f0 17f8 7f0 58f8 7f0 The method of specifying conditional break and tracepoints has changed; see the ATtach Condition command in the next section.x2e6jk40\80f8 16f0 When an exit break is set, the Debugger breaks on any return of the procedure by setting the actual breakpoint on a common return instruction. The Debugger has no way of telling which return was taken if there is more than one. When asked to display the source line when at an exit break, the Debugger now shows the declaration line of the procedure instead of the last return statement.x2e6jk40 Case On/Offx2e12jk60(2116)\f8 11f0i The Debugger no longer ignores case, and the case commands have been deleted; identifiers must be typed with their correct capitalization.x2e6jk40(1799)\78i60I Control DELx2e12jk60(2116)\f8 11f0i Typing ^DEL will now abort the display of long arrays and strings, as well as most searches. This key combination no longer has to be held down to be recognized.x2e6jk40\7f7b4f0B COremapx2e12jk60\f8 7f0i This command now prints more information about some data segments; the (system-assigned) types currently recognized are heap, system, frame, table, bitmap, stream buffer, and Pup buffer. Unrecognized types (assigned by the user) are displayed as data(t); an unknown type is displayed as data(?).x2e6jk40\247f8 7f0 34f8 7f0 Display Process [process]x2e12jk60\f8 17f0b7f8B1f0i The subcommand space (SP) can now be used to invoke the interpreter.x2e6jk40\22f7b2f0B Display Stackx2e12jk60\f8 13f0i The new subcommand "g" displays the global variables of the module containing the current procedure. A space (SP) invokes the interpreter. If the source window is loaded with the s(ource) subcommand, the window will remember the appropriate context for setting breakpoints.x2e6jk40\20f8 1f0 90f7b2f0B68f8 8f0 Interpret Callx2e12jk60\f8 14f0i The Interpret Call command has been deleted; the Debugger's interpreter should be used. There are no longer any restrictions on when the interpreter may be called.x2e6jk40\4f8 14f0 ReSet Context [confirm]x2e12jk60\f8 23f0i This command now requires two keystrokes, to avoid conflict with the ReMote debuggee command (not yet implemented on the Alto). x2e6jk40\69f8 15f0 STart [address] [Confirm]x2e12jk60\f8 7f0b7f8B11f0i This command now requires confirmation.x2e6jk40 New Commandsx2e12jk80\i AScii Display [address, count]x2e12jk60\f8 15f0b7f8B2f0b5f8B1f0i Interprets address as POINTER TO PACKED ARRAY OF CHARACTER and displays count characters (each character separately, not as a string).x2e6jk40\11b7B4f7 36f0 14b5B ATtach Condition [number, condition]x2e12jk60\f8 18f0b6f8B2f0b9f8B1f0i This command replaces old style conditional breaks; it changes a normal breakpoint into a conditional one. Arguments are a breakpoint number and a condition, which is evaluated in the context of the breakpoint. The breakpoint number is displayed when the break/tracepoint is set, and may also be obtained using the LIst Breaks command.x2e6jk40\317f8 11f0 ATtach Keystrokes [number, command]x2e12jk60\f8 19f0b6f8B2f0b7f8B1f0i Arbitrary command strings can now be attached to break and tracepoints; they are executed by the Debugger when the breakpoint is taken. Arguments are a breakpoint number and a command string terminated with a CR. A CR can be embedded in the command string by quoting it with ^V.x2e6jk40\210f7b2f0B5f7b2f0B58f7b2f0B ATtach Loadstate [filename]x2e12jk60\f8 18f0b8f8B1f0i Like ATtach Image, except that the initial rather than the current loadstate of the image file is used; this command is for wizards only.x2e6jk40\5f8 12f0 Break All Entries/Xits [module]x2e12jk60\f8 24f0b6f8B1f0i This new command is the same as Trace All Entries/Xits, except that breakpoints are set.x2e6jk40\32f8 22f0 CLear Break [number]x2e12jk60\f8 13f0b6f8B1f0i This command clears breakpoints by number. Typing CR in place of a number will clear the current breakpoint, i.e., the one that transferred control into the Debugger.x2e6jk40\51f7b2f0B CLear Condition [number]x2e12jk60\f8 17f0b6f8B1f0i This command changes a conditional breakpoint into a normal one. Typing CR in place of a number behaves as in CLear Break.x2e6jk40\73f7b2f0B36f8 11f0 CLear Keystrokes [number]x2e12jk60\f8 18f0b6f8B1f0i This command clears any command string associated with the breakpoint. Typing CR in place of a number behaves as in CLear Break.x2e6jk40\79f7b2f0B36f8 11f0 LOgin [user, password]x2e12jk60\f8 7f0b4f8B2f0b8f8B1f0i This command sets the default user name and password for the debugging session. The new user name and password are not written into the client's core image or onto the disk.x2e6jk40 ReMote Debugee [host]x2e12jk60\f8 16f0b4f8B1f0i This command is not implemented on the Alto.x2e6jk40 Trace Stackx2e12jk60\f8 11f0i This command is used when the Debugger breaks and enters the debugger nub ("//" mode); it dumps the Debugger's call stack in octal to the log. Change requests reporting Debugger problems that result in an uncaught signal or other problem should be accompanied by a Debug.log which includes the output of this command.x2e6jk40\76f8 2f0 188f8 9f0 Interpreterx2e18jk80\b11Bi The interpreter provides support for all of the new language features introduced in Mesa 6. All commands requiring numeric input now invoke the interpreter automatically (e.g., Octal Read: @p, n: SIZE[r]).x2e12jk40(1799)\178f8 26f0 Grammarx2e12jk80(2116)\i A summary of the revised grammar is attached. The constructs ABS, ERROR, LONG, LOOPHOLE, MAX, MIN, NIL, POINTER TO, PROC, PROCEDURE, SIGNAL, WORD, and open and half open intervals have been added to the interpreter's grammar; type REAL has been added for output only. Type expressions following % must be enclosed in parentheses. The interpreter syntax Expression? has replaced the Interpret Expression command; it prints the value of the expression in several formats including octal and decimal.x2e12jk40(1799)\62f7 3f0 2f7 5f0 2f7 4f0 2f7 8f0 2f7 3f0 2f7 3f0 2f7 3f0 2f7 10f0 2f7 4f0 2f7 9f0 2f7 6f0 2f7 4f0 86f7 4f0 61f6b1f0B58f6b11f0B18f8 20f0 Target Typingx2e12jk80(2116)\i The interpreter now does a much better job of target typing. As a result, arguments to procedure calls and right hand sides of assignments are type checked. In addition, assignments to enumerated types now work correctly.x2e12jk40(1799) The interpreter also does a better job of determining signed/unsigned representation. For example, any octal number is assumed to be unsigned.x2e12jk40 Symbol Lookup x2e18j(635)\b13B Even if a module has compressed symbols, the debugger will first look for the file modulename.bcd to see if it is the original compiler output for that module (by checking the version stamp). If so, it will use those symbols. Thus, there is no need to Attach Symbols if the proper file is on the disk. It makes sense to use compressed symbols for large systems and to also have present the complete symbol files for the specific modules undergoing detailed debugging. x2e12jk40(1799)\83f8 14f0 157f8 14f0 Output Conventionsx2e18jk80(2116)\b18Bi In display stack mode, variables declared in nested blocks are now shown indented according to their nesting level.x2e12jk40 A "?" in a variable display now uniformly means that the value is out of range; ". . ." indicates that there are additional fields present which cannot be displayed due to lack of symbol table information.x2e12jk40\3f8 1f0 77f8 5f0 When the debugger refers to a program module, it usually gives the address of its global frame, e.g., "G: nnnnnB". If the module has not been started, the debugger now prints a "~" after the B. If a module has not been started, the user should not modify the global variables of that module, nor should they be displayed, as they are uninitialized.x2e12jk40\103f8 9f0 80f8 1f0 46i17I New Error Messagesx2e18jk80\b18Bi The warning Eval stack not empty! will be printed if the debugger is entered via either an interrupt or a breakpoint with variables still on the evaluation stack; this indicates that the current value of some variables may not be in main memory, where the interpreter normally looks. Exceptions to this are at entry and exit breaks; the debugger has enough information to decode the argument records that are on the stack in this case (if the appropriate symbol tables are available).x2e12jk40\12f8 21f0 Before the debugger permits any breakpoints to be set using the source window, the creation date in the source file is checked against the corresponding date recorded by the compiler in the BCD. The message Can't use of