Inspect Manual Abstract This manual describes Inspect, a command-line tool for debugging TNS C/C++, COBOL, FORTRAN, Pascal, Screen COBOL, and TAL programs and snapshots on HP NonStop™ TNS/R and TNS/E systems. Product Version Inspect H01 Supported Release Version Updates (RVUs) This publication supports J06.03 and all subsequent J-series RVUs, H06.03 and all subsequent H-series RVUs, G01.00 and all subsequent G-series RVUs, and D40.
Document History Part Number Product Version Published 118810 Inspect D40 December 1995 429164-002 Inspect H01 July 2005 429164-003 Inspect H01 January 2006 429164-004 Inspect H01 August 2010 429164-005 Inspect H01 February 2012 429164-006 Inspect H01 April 2013
Legal Notices Copyright 2013 Hewlett-Packard Development Company L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice.
Inspect Manual Glossary Index Examples Figures Legal Notices What’s New in This Manual xxvii Manual Information xxvii New and Changed Information xxvii About This Manual xxxi Related Documentation xxxi Organization of This Manual xxxi Notation Conventions xxxiii Change Bar Notation xxxv HP Encourages Your Comments xxxvi 1.
1. Introduction (continued) Contents 1. Introduction (continued) Low-Level Mode 1-6 Automatic Command Mode Selection 1-7 Inspect Components 1-7 The Inspect Process 1-8 The IMON Process Pair 1-8 The DMON Process 1-9 Inspect, IMON, and DMON Swap and Extended Swap Files Remote Debugging 1-9 2.
3. Inspect Command Overview Contents 3. Inspect Command Overview Entering Inspect Commands 3-1 Debugging the Current Program 3-2 Managing Multiple Programs 3-3 Managing Source Files 3-3 Entering and Editing Inspect Commands Customizing an Inspect Session 3-5 Managing an Inspect Session 3-6 Simplifying an Inspect Session 3-6 3-4 4.
6. High-Level Inspect Commands Contents 6.
Contents 6. High-Level Inspect Commands (continued) 6.
Contents 6. High-Level Inspect Commands (continued) 6.
6. High-Level Inspect Commands (continued) Contents 6.
Contents 6. High-Level Inspect Commands (continued) 6.
Contents 6. High-Level Inspect Commands (continued) 6.
6. High-Level Inspect Commands (continued) Contents 6.
Contents 6. High-Level Inspect Commands (continued) 6.
Contents 6. High-Level Inspect Commands (continued) 6.
6. High-Level Inspect Commands (continued) Contents 6. High-Level Inspect Commands (continued) Usage Considerations 6-218 Related Commands 6-218 TIME 6-219 Usage Considerations 6-219 TRACE 6-219 Usage Considerations 6-219 Related Commands 6-221 Examples 6-221 VOLUME 6-223 Default Value 6-224 Usage Considerations 6-224 Related Commands 6-224 XC 6-224 Default Value 6-225 Usage Consideration 6-225 Related Commands 6-225 7.
8. Using Inspect With C (continued) Contents 8.
9. Using Inspect With C++ (continued) Contents 9. Using Inspect With C++ (continued) Unions 9-9 Inspect Enhancements and Restrictions for C++ 9-9 Uppercase and Lowercase Letters 9-9 Defining Objects in Block Structure 9-9 Overloaded Functions 9-9 Overloaded Operators 9-10 Static Data 9-10 The this Pointer 9-11 Usage Considerations 9-11 Command Usage Guidelines for C++ Programmers 9-13 BREAK 9-13 DISPLAY 9-13 HELP 9-13 INFO IDENTIFIER 9-13 INFO OPENS 9-13 MATCH 9-14 SCOPE 9-14 SET RADIX 9-14 STEP 9-14 10.
10. Using Inspect With COBOL and SCREEN COBOL (continued) Contents 10. Using Inspect With COBOL and SCREEN COBOL (continued) DISPLAY 10-12 HELP 10-12 INFO IDENTIFIER 10-12 MODIFY 10-13 SCOPE 10-13 SET RADIX 10-13 STEP 10-13 11.
12. Using Inspect With Pascal Contents 12.
13. Using Inspect With TAL and pTAL (continued) Contents 13. Using Inspect With TAL and pTAL (continued) Expressions 13-8 Usage Considerations 13-9 TAL and pTAL Data Types and Inspect 13-9 Arrays 13-9 Structures and Substructures 13-10 Command Usage Guidelines for TAL and pTAL Programmers BREAK 13-11 DISPLAY 13-12 HELP 13-12 INFO IDENTIFIER 13-12 MODIFY 13-13 SCOPE 13-13 SET RADIX 13-13 STEP 13-13 TRACE 13-14 14.
Contents 15. Using Inspect on a TNS/R System (continued) 15. Using Inspect on a TNS/R System (continued) Optimizations With Branches 15-9 TNS Instruction Side Effects 15-10 Debugging Programs at the TNS/R Machine Level What You Need to Know 15-10 TNS/R Breakpoints 15-11 TNS/R Machine Registers 15-11 Machine Code Addresses 15-12 Save Files 15-13 TNS/R Machine-Level Commands 15-13 15-10 16.
17. Using Inspect With TNS/R Native Programs Contents 17.
B. Syntax Summary Contents B.
B. Syntax Summary (continued) Contents B.
B. Syntax Summary (continued) Contents B.
C. Notes for System Operators (continued) Contents C. Notes for System Operators (continued) DMON Errors C-5 Glossary Index Examples Example 5-1. Example 5-2. Example 5-3. Example 5-4. Starting a TCP for Requester Program Debugging 5-5 Starting a Requester Program in the Hold State 5-7 Starting a Server in the Hold State 5-12 Starting a TCP in the Hold State 5-14 Figures Figure 1-1. Figure 1-2. Figure 4-1. Figure 4-2. Figure 4-3. Figure 4-4. Figure 5-1. Figure 5-2. Figure 5-3. Figure 15-1.
Tables (continued) Contents Tables (continued) Table 6-2. Table 7-1. Table 14-1. Table 14-2. Table 16-1. Table 17-1. Table 18-1. Table 18-2.
Contents Inspect Manual—429164-006 xxvi
What’s New in This Manual Manual Information Inspect Manual Abstract This manual describes Inspect, a command-line tool for debugging TNS C/C++, COBOL, FORTRAN, Pascal, Screen COBOL, and TAL programs and snapshots on HP NonStop™ TNS/R and TNS/E systems. Product Version Inspect H01 Supported Release Version Updates (RVUs) This publication supports J06.03 and all subsequent J-series RVUs, H06.03 and all subsequent H-series RVUs, G01.00 and all subsequent G-series RVUs, and D40.
Changes to the H06.21/J06.10 manual: What’s New in This Manual Changes to the H06.21/J06.10 manual: Supported release statements have been updated to include J-series RVUs. Added a new section, Limitation of the STEP Command on page 6-215. Updated the description of IMON and CMON on page C-2. Changes in the January 2006 revision of the Manual Updated an example for the MODIFY command to include the & operator on page 6-151.
What’s New in This Manual Changes to the Original Inspect H01 Manual Added the information that the BOTH option does not show TNS/E instructions for an OCA process on a TNS/E system on page 6-97. Updated the usage guideline of INFO OBJECTFILE on page 6-111 and INFO SAVEFILE on page 6-120. Added two examples to show the listing for an accelerated TNS program running on a TNS/R and TNS/E system on page 6-140 and 6-141.
What’s New in This Manual Changes to the Original Inspect H01 Manual Inspect Manual—429164-006 xxx
About This Manual This manual describes the Inspect interactive symbolic debugger for TNS/R and TNS/E systems. This manual is intended for system and application programmers. Related Documentation For more information about debugging on the TNS/E platform, see: Inspect online help (and the description of HELP on page 6-91).
Organization of This Manual About This Manual Table i. Contents of the Inspect Manual Section Title Contents 8 Using Inspect With C Provides the language-specific information necessary to debug C programs using Inspect. 9 Using Inspect With C++ Provides the language-specific information necessary to debug C++ programs using Inspect.
Notation Conventions About This Manual Notation Conventions Hypertext Links Blue underline is used to indicate a hypertext link within text. By clicking a passage of text with a blue underline, you are taken to the location described. For example: This requirement is described under Backup DAM Volumes and Physical Disk Drives on page 3-2. General Syntax Notation This list summarizes the notation conventions for syntax presentation in this manual. UPPERCASE LETTERS.
General Syntax Notation About This Manual { } Braces. A group of items enclosed in braces is a list from which you are required to choose one item. The items in the list can be arranged either vertically, with aligned braces on each side of the list, or horizontally, enclosed in a pair of braces and separated by vertical lines. For example: LISTOPENS PROCESS { $appl-mgr-name } { $process-name } ALLOWSU { ON | OFF } | Vertical Line.
Change Bar Notation About This Manual a blank line. This spacing distinguishes items in a continuation line from items in a vertical list of selections. For example: ALTER [ / OUT file-spec / ] LINE [ , attribute-spec ]… !i and !o. In procedure calls, the !i notation follows an input parameter (one that passes data to the called procedure); the !o notation follows an output parameter (one that returns data to the calling program).
HP Encourages Your Comments About This Manual HP Encourages Your Comments HP encourages your comments concerning this document. We are committed to providing documentation that meets your needs. Send any errors found, suggestions for improvement, or compliments to docsfeedback@hp.com. Include the document title, part number, and any comment, error found, or suggestion for improvement you have concerning this document.
1 Introduction Inspect Features Inspect Command Modes on page 1-6 High-Level Mode on page 1-6 Low-Level Mode on page 1-6 Automatic Command Mode Selection on page 1-7 Inspect Components on page 1-7 The Inspect Process on page 1-8 The IMON Process Pair on page 1-8 The DMON Process on page 1-9 Remote Debugging on page 1-9, or using Inspect across a network Inspect Features Inspect is an interactive symbolic debugger that enables you to isolate program bugs quickly.
Interactive Control of Program Execution Introduction Debugging programs in an OSS environment Interactive Control of Program Execution Inspect enables you to look at your program while it is running. Without interactive control of program execution, take these actions: 1. Edit your source code, adding statements that write out status messages. 2. Recompile your source program. 3. Execute the resultant object program. 4. Examine the status messages. 5. Return to Step 1.
Source-Level and Machine-Level Program Access Introduction Source-Level and Machine-Level Program Access When you debug a program written in a high-level language, the debugger should provide source-level access to the program. Machine registers, absolute addresses, and internal storage schemes generally are not a concern. Inspect provides this type of source-level, or symbolic, access.
Support of Optimizing Compilers Introduction Although the functions and names of high-level commands are uniform across all supported languages, the parameters to several of the commands are languagedependent. Therefore, you have the flexibility needed to offer you symbolic access to your program.
Code and Data Breakpoints Introduction configure the environment any way you want. Note that the commands in the INSPCSTM file override those in the INSPLOCL file because Inspect processes the INSPCSTM file after the INSPLOCL file. When debugging PATHWAY requestor programs, your logon volume and subvolume may differ from the owner of the process ID of the TCP’s volume and subvolume. Code and Data Breakpoints Inspect lets you set breakpoints at both code and data locations within your program.
Inspect Command Modes Introduction Although there are no TNS OSS processes on TNS/E systems, you can use Inspect to debug a TNS OSS snapshot on a TNS/E system. Inspect Command Modes Inspect provides two command modes: high-level mode and low-level mode. Highlevel mode provides source-level access to your program, while low-level mode provides machine-level access. Each mode has its own set of commands, but they offer many of the same functions.
Automatic Command Mode Selection Introduction Low-level Inspect offers these special features that are not available in Debug: Recognition of source-language names of code blocks. Stepping through your program by machine instructions (on TNS/R systems, this can be done with non-accelerated programs only). Automatic Command Mode Selection When the execution of your program is suspended, Inspect automatically selects its command mode, depending on the availability of symbol information.
The Inspect Process Introduction Figure 1-1 presents a conceptual overview of these component processes and their interaction. Figure 1-1. Inspect Components \SYS01 CPU00 INSPECT $DM00 CPU01 INSPECT $IMON $DM01 CPU15 INSPECT $DM15 VST101.vsd The Inspect Process An Inspect process provides the terminal interface through which you interact with the Inspect debugger. The other functions of an Inspect process include: Retrieving source code from source files.
The DMON Process Introduction Starting a DMON process on each processor in your system Monitoring the status of the DMON processes, ensuring that a DMON is always running in each CPU Starting Inspect processes The DMON Process A DMON process runs on each processor in a system that has IMON running. The name of the DMON process running on processor number nn is $DMnn.
Remote Debugging Introduction been started remotely or you will receive a security error from the operating system on the remote node. Figure 1-2 shows the configuration when debugging across a network. . Figure 1-2. Inspect Across a Network \SYS01 CPU00 INSPECT $DM00 CPU01 INSPECT $IMON $DM01 CPU15 INSPECT \LOCAL $DM15 CPU00 $DM00 CPU01 INSPECT $IMON $DM01 CPU15 INSPECT $DM15 VST102.
2 Inspect Concepts Inspect Sessions Starting an Inspect Session on page 2-2 Prompting for Commands on page 2-3 Reporting Events on page 2-3 Ending an Inspect Session on page 2-4 What Inspect Debugs on page 2-4 Processes on page 2-4 Save Files on page 2-5 PATHWAY Servers on page 2-6 PATHWAY Requester Programs on page 2-6 Debugging Multiple Programs on page 2-7 Execution States of a Program on page 2-7 The Run State on page 2-8 The Hold State on page 2-8 The H
Starting an Inspect Session Inspect Concepts Starting an Inspect Session There are four ways to start an Inspect session: Run Inspect directly. From the TACL prompt, enter: >RUN INSPECT or: >INSPECT From the OSS shell, enter: gtacl -p inspect Run your program with the debug option. From the TACL prompt, enter: >RUND program From the OSS shell, enter: run -debug -inspect=on program Issue a debug request on a running program.
Prompting for Commands Inspect Concepts Consequently, your system manager can customize the Inspect environment for all Inspect sessions that run on your system. After reading the INSPLOCL file, the Inspect process looks for an EDIT file named INSPCSTM in the logon volume and subvolume of the creator of the process being debugged. However, for PATHWAY programs, Inspect uses the default volume and subvolume of the individual who started PATHMON.
Ending an Inspect Session Inspect Concepts location where the event occurred: line number 1862 within the scope unit MAIN, whose source file is TALSRC. The SET STATUS command enables you to customize Inspect event reporting. For more information, see SET STATUS ACTION on page 6-186 and SET STATUS LINE25 and SET STATUS SCROLL on page 6-187.
Save Files Inspect Concepts Inspect enables you to debug processes started from program files whose object code was compiled from C, COBOL, COBOL85, FORTRAN, Pascal, or TAL source code.
PATHWAY Servers Inspect Concepts Inspect pairs a save file with the program file that created the saved process; it therefore enables you to examine a “frozen” process. Such examination makes the task of finding and eliminating fatal bugs (those that cause an ABEND) much easier. Note. Save files include an indication of whether the program has been accelerated and the current instruction set that is being executed. For accelerated programs, it also stores TNS/R machine registers.
Debugging Multiple Programs Inspect Concepts PATHWAY requester programs can be started by entering one of these PATHCOM commands: START TERM starts the PATHWAY requester program associated with a given terminal by an earlier SET TERM command. RUN PROGRAM starts a given PATHWAY requester program at the PATHCOM command terminal. Inspect enables you to debug PATHWAY requester programs compiled with the SCREEN COBOL directive SYMBOLS.
The Run State Inspect Concepts The Run State A program is in the run state as long as it is executing. A program enters the run state when it is first created (and it is not configured to enter the hold state immediately) or when you enter a RESUME or STEP command to release it from the hold state. A program leaves the run state when it completes execution, whether normally or abnormally, or when a debug event occurs. In the former case, the program enters the stop state.
Breakpoints and Break Events Inspect Concepts All these actions cause a debug event to occur: You enter the DEBUG or RUND command from TACL. You enter the START TERM command from PATHCOM for a terminal that you've configured with a SET TERM INSPECT ON command. You enter an Inspect command from PATHCOM. You enter a HOLD or ADD PROGRAM command from Inspect. Program execution (or termination) activates a breakpoint, and the breakpoint triggers a break event.
Setting Breakpoints Inspect Concepts Inspect puts the program into the hold state, reports the breakpoint, and then performs any break action associated with the breakpoint. Setting Breakpoints Inspect maintains a breakpoint list for each program you are debugging, and enables you to add breakpoints to or to remove breakpoints from the current program's breakpoint list. The time at which you set a breakpoint is called breakpoint definition.
Processing Breakpoints Inspect Concepts contained in the variable are not reported. You can have only one data breakpoint at a time in each program that you are debugging. Note. Specific constraints apply to data breakpoints when executing accelerated programs on TNS/R systems. For more information, see Section 16, Using Inspect With Accelerated Programs on TNS/R Systems.
Scope of Identifiers Inspect Concepts Scope of Identifiers The concept of scope is central to several programming languages. The scope of an identifier determines the portion of the program in which that identifier is defined (also referred to as the domain of an identifier). All the languages that use the concept of scope provide some construct by which the programmer can define the boundaries of a specific scope domain.
Activation of Scope Units Inspect Concepts According to the general syntax, the scope path for the identifiers A, B, and C is: #main.deep The scope path for the identifiers X, Y, and Z is: #main.deep.deeper.deepest Refer to the language-specific portions of this manual for language-specific syntax. The Current Scope Path If you do not specify a scope path when you refer to an identifier, Inspect assumes that the identifier is in the current scope path.
Activation of Scope Units Inspect Concepts executed back to the main scope unit in the program. If a scope unit does not appear in the call history, it is called an inactive scope unit. Note. Inspect permits a limited set of operations for inactive scope units. In an inactive scope unit, you can: Set or clear breakpoints. Display the attributes of an identifier. Display object code and source text (but not data values).
Expressions Inspect Concepts knowing the number of instances. This example illustrates the difference between relative and absolute instances: -PROGRAM-TRACE Num Lang Location 0 TAL #A.#42 1 TAL #B.#57 2 TAL #A.#101 3 TAL #A.#4 4 TAL #C.#67 5 TAL #B.#49 6 TAL #A.#78 7 TAL #M.#3 The number in the leftmost columns is the scope ordinal. Scope 0 is always the most recent scope, or the current execution scope. Its caller is scope ordinal 1; the caller of scope 1 is scope ordinal 2 and so on.
Code Locations Inspect Concepts Code Locations A code location is a symbolic reference to a specific location in the object code of a program. Although the syntax used to specify a code location varies slightly for each source language, the general syntax is the same for all languages. { scope-path } { } [ code-offset [1] [2] [3] { [ scope-path.
Code Locations Inspect Concepts label [ FROM source-file ] specifies the statement following a given label in the source code. The FROM clause identifies the label by the source file in which it is found; therefore, Inspect can distinguish between labels that have the same name. #line-number [ (source-file) ] specifies the statement starting at a given line number in the source file.
Data Locations Inspect Concepts Data Locations A data location is a symbolic reference to a data item within a program. Although the syntax used to specify a data location varies for each source language, the general syntax is the same for all languages. [ scope-path [ (instance) ] . ] data-reference scope-path specifies the scope path to the scope unit containing the data item. instance specifies a specific activation of the scope unit containing the data item.
Data Locations Inspect Concepts You can display the value of PRICE for the fourth through sixth occurrences of WIDTH of the second occurrence of THICKNESS by entering the command: -COBOBJ-DISPLAY price(2,4:6) LUMBER-TABLE.THICKNESS[2].WIDTH[4].PRICE= 1.89 LUMBER-TABLE.THICKNESS[2].WIDTH[5].PRICE= 2.09 LUMBER-TABLE.THICKNESS[2].WIDTH[6].PRICE= 2.
Data Locations Inspect Concepts Inspect Manual—429164-006 2-20
3 Inspect Command Overview Debugging the Current Program Managing Multiple Programs on page 3-3 Managing Source Files on page 3-3 Entering and Editing Inspect Commands on page 3-4 Customizing an Inspect Session on page 3-5 Managing an Inspect Session on page 3-6 For detailed descriptions of the high-level and low-level Inspect commands, see Section 6, High-Level Inspect Commands, and Section 7, Low-Level Inspect. Entering Inspect Commands Inspect processes commands on a line-by-line basis.
Debugging the Current Program Inspect Command Overview Pressing BREAK returns you to the Inspect prompt. If you press the BREAK key when entering a command (even if you are on a continuation line), Inspect retains the accumulated command list, except for commands on the line that you were entering. However, Inspect does not interpret the command list; instead, it prompts for another command.
Managing Multiple Programs Inspect Command Overview Table 3-1. Commands for Debugging the Current Program (page 2 of 2) Command Description MODIFY Changes the value of a data item or register in the current program. SAVE Creates a save file of the current program, including its extended segments. SOURCE Displays source code. TRACE Displays the call history for the current program location.
Entering and Editing Inspect Commands Inspect Command Overview Table 3-3. Commands for Managing Source Files Command Description ADD SOURCE ASSIGN Adds a source assignment to the current program’s source assignment list. DELETE SOURCE ASSIGN Removes one or all source assignments from the current program’s source assignment list. DELETE SOURCE OPEN Closes one or all source files that Inspect has opened as the result of previous SOURCE commands.
Customizing an Inspect Session Inspect Command Overview Table 3-4. Commands for Entering and Editing Inspect Commands (page 2 of 2) Command Description LIST HISTORY Displays a portion of or the entire history buffer. SELECT LANGUAGE Changes the current source language, therefore changing the acceptable syntax of language-dependent entities. XC Reexecutes a command line in the history buffer.
Managing an Inspect Session Inspect Command Overview Managing an Inspect Session Inspect provides several commands that enable you to manage and control your Inspect session. Table 3-6 lists these commands. Table 3-6. Commands for Managing and Inspect Session Command Description COMMENT (OR “- -”) Directs Inspect to ignore the remainder of the command line, therefore enabling you to add remarks in a LOG file, an OBEY file, or the INSPLOCL or INSPCSTM configuration files.
Simplifying an Inspect Session Inspect Command Overview Table 3-7. Commands for Simplifying an Inspect Session (page 2 of 2) Command Description IDENTIFIER Displays information about the internal characteristics of a given data location or of all data locations in one or more scope units. The IDENTIFIER command is a synonym for the INFO IDENTIFIER command. KEY Adds a function-key definition or displays one or all function-key definitions in the function-key list for the current Inspect session.
Simplifying an Inspect Session Inspect Command Overview Inspect Manual—429164-006 3-8
4 Debugging Processes and Save Files Inspect in the Guardian Environment on page 4-2 Command and Home Terminals on page 4-3 Debugging Processes on page 4-3 The Debugging Attributes of a Process on page 4-4 Preparing and Configuring for Process Debugging on page 4-8 Starting a Debugging Session on page 4-8 Guidelines for Debugging a Process on page 4-10 Ending a Debugging Session on page 4-12 Examining Save Files on page 4-13 Inspect Manual—429164-006 4-1
Inspect in the Guardian Environment Debugging Processes and Save Files Inspect in the Guardian Environment Figure 4-1 shows the various components involved when you debug processes and save files in the Guardian environment. Figure 4-1. Inspect in the Guardian Environment User Process DMON Save file INSPECT INSPECT Command Terminal and User Process Home Terminal Source Files Program Files VST401.
Command and Home Terminals Debugging Processes and Save Files Command and Home Terminals Command terminals are terminals where system managers, developers, and programmers interact with system-level utility programs. When debugging processes or examining save files, only one command terminal is involved: the Inspect command terminal. Home terminals are terminals where a process is started.
The Debugging Attributes of a Process Debugging Processes and Save Files The Debugging Attributes of a Process Each process has two debugging attributes, INSPECT and SAVEABEND. The software sets the values of these attributes for a process when it starts the process. The Inspect attribute determines which debugging tool (Inspect or Debug) to use for the process.
The Debugging Attributes of a Process Debugging Processes and Save Files If the Inspect attribute of any of these is ON, then the system software sets the process's INSPECT attribute to ON. If the SAVEABEND attribute of any of these is ON, then the system sets the process's SAVEABEND attribute to ON. Note. If the creator of the process does not have read access to the program file, the system software sets both the Inspect and the SAVEABEND attributes to OFF.
The Debugging Attributes of a Process Debugging Processes and Save Files Figure 4-3. Debugger Selection on a TNS/R System Start INSPECT attribute off? Yes No Select Visual Inspect Yes Visual Inspect available? No PIC? Yes No Select Inspect Yes Inspect available? No Select Debug End VST0403.
The Debugging Attributes of a Process Debugging Processes and Save Files Process Type INSPECT Attribute Debugger Precedence TNS INSPECT ON Visual Inspect, Inspect, Debug TNS INSPECT OFF Debug TNS/R Native non-PIC INSPECT ON Visual Inspect, Inspect, Debug TNS/R Native non-PIC INSPECT OFF Debug TNS/R Native PIC INSPECT ON Visual Inspect, Debug TNS/R Native PIC INSPECT OFF Debug Note that Visual Inspect can only be selected when a matching client connection already exists.
Preparing and Configuring for Process Debugging Debugging Processes and Save Files RUN[D] and #NEWPROCESS. When you start a process using the RUN[D] command or the #NEWPROCESS built-in function, the Inspect state of the command interpreter session determines the attribute values of the start-up command. The Inspect state has one of three values: OFF, ON, or SAVEABEND.
Starting a Debugging Session Debugging Processes and Save Files A process invokes the DEBUGPROCESS procedure, putting another process in the hold state. Note. A process must exit out of system code before it enters the HOLD state. The process itself invokes the operating system software's Debug procedure, putting itself in the hold state. The process encounters a trap for which it does not have a trap handler, putting the process in the hold state.
Guidelines for Debugging a Process Debugging Processes and Save Files The operating system then starts the debugging tool specified by the Inspect attribute of the process on the process's home terminal. Note. The process enters the hold state as soon as it completes the machine-code instruction that was executing when the debug event occurred. If the process has invoked a procedure, it will not enter the hold state until the procedure returns control to the process.
Guidelines for Debugging a Process Debugging Processes and Save Files Pressing the BREAK Key Pressing the BREAK key on the Inspect command terminal has various results, depending on the status of the session at the moment you press BREAK: If the current program is in the run state, pressing the BREAK key causes Inspect to issue a prompt. Inspect does not, however, place the current program in the hold state: you must enter a HOLD command.
Ending a Debugging Session Debugging Processes and Save Files used up its pause time, it will start prompting you again, perhaps before you pause the command interpreter process. Ending a Debugging Session If you want your process to continue running after you end the debugging session, use the EXIT command or the RESUME * EXIT command. If you want to terminate your process, use the STOP command.
Examining Save Files Debugging Processes and Save Files Examining Save Files Figure 4-4 highlights the components involved when examining save files. Figure 4-4. Examining Save Files User Process DMON Save file INSPECT INSPECT Command Terminal and User Process Home Terminal Saved Process's Source File(s) Saved Process's Program File VST403.vsd The Inspect process provides all the necessary services when you are examining a save file; neither IMON nor DMON is involved.
Examining Save Files Debugging Processes and Save Files RESUME SAVE SELECT DEBUGGER DEBUG STEP If you attempt to use one of these commands, Inspect displays the message: ** Inspect error 21 ** Invalid operation on a saved program The TYPE clause of the DISPLAY command may yield different results for a save file than for the equivalent running process.
Examining Save Files Debugging Processes and Save Files If you have been using Inspect solely to examine save files, a series of STOP commands (or STOP *) closes all the save files, but Inspect continues to execute. You can use the EXIT command at any time and Inspect closes all save files and exits. You will only receive a confirmation that you want to exit if you have active processes.
Examining Save Files Debugging Processes and Save Files Inspect Manual—429164-006 4-16
5 Debugging PATHWAY Applications Inspect in the PATHWAY Environment on page 5-2 Application, Command, and Home Terminals on page 5-3 Debugging PATHWAY Requester Programs on page 5-3 Preparation and Configuration on page 5-5 Starting the Debugging Session on page 5-6 Guidelines for Debugging Requester Programs on page 5-8 Ending the Debugging Session on page 5-9 Debugging PATHWAY Servers on page 5-10 Preparation and Configuration on page 5-11 Starting the Debugging Sessio
Inspect in the PATHWAY Environment Debugging PATHWAY Applications Inspect in the PATHWAY Environment Figure 5-1 shows how Inspect interacts with the PATHWAY system to provide debugging facilities for PATHWAY applications. Figure 5-1. Inspect in the PATHWAY Environment PATHCOM PATHMON PATHWAY Terminals Server Class Requester's Program File PATHCOM Command Terminal TCP INSPECT Server DMON INSPECT Command Terminal Requester's and Server's Source File Server's Program File VST501.
Debugging PATHWAY Applications Application, Command, and Home Terminals Application, Command, and Home Terminals Application terminals are terminals where users interact with PATHWAY applications. TCPs manage these terminals and PATHWAY requesters (that is, a TCP executing a requester program) control them. Sometimes they are called PATHWAY terminals. Command terminals are terminals where system managers, developers, and programmers interact with system-level utility programs.
Debugging PATHWAY Requester Programs Debugging PATHWAY Applications Figure 5-2. Debugging PATHWAY Requester Programs PATHCOM PATHMON PATHWAY Terminals Server Class Requester's Program File PATHCOM Command Terminal TCP INSPECT Server DMON INSPECT Command Terminal Requester's and Server's Source File Server's Program File VST502.
Preparation and Configuration Debugging PATHWAY Applications either, but the data access and retrieval services they provide are required to insure the requester program's proper functioning. Preparation and Configuration To use Inspect to debug a requester program, you must first ensure that the requester program's program file includes symbol information.
Starting the Debugging Session Debugging PATHWAY Applications Because you can alter the configuration of a TCP only when it is stopped, the actual sequence of commands is: =STOP TCP TCP-name =ALTER TCP TCP-name, INSPECT ON (FILE $INSPECT-command-term) =START TCP TCP-name If you do not include the FILE option in the SET or ALTER command, the Inspect process uses the TCP's home terminal as its command terminal.
Starting the Debugging Session Debugging PATHWAY Applications Example 5-2. Starting a Requester Program in the Hold State =SET TERM FILE $mypway =SET TERM INITIAL req-pgm =SET TERM TCP debug-tcp =SET TERM INSPECT ON (FILE $mydbug) =ADD TERM req-term =START TERM req-term If you do not include the FILE option in the SET TERM INSPECT command, the Inspect process uses the terminal specified in the SET TCP INSPECT command as its command terminal.
Debugging PATHWAY Applications Guidelines for Debugging Requester Programs Requester Programs Started Using the RUN PROGRAM Command When you start a requester program using the PATHCOM command RUN PROGRAM, the PATHCOM command terminal usually becomes the application terminal. PATHMON assigns the terminal a synthetic application terminal name. In this case, you need to determine the synthetic name before you can use the INSPECT TERM command to begin debugging the requester program.
Ending the Debugging Session Debugging PATHWAY Applications Using the PATHCOM Terminal as the Inspect Terminal When debugging requester programs, you should use three terminals: one for the application, one for the PATHCOM command terminal, and one for the Inspect command terminal. You can, however, debug with only two terminals: one for the application and one for both the PATHCOM and Inspect command terminals.
Debugging PATHWAY Servers Debugging PATHWAY Applications Debugging PATHWAY Servers Figure 5-3 highlights the components of Inspect and the PATHWAY system used when debugging PATHWAY servers. Figure 5-3. Debugging PATHWAY Servers PATHCOM PATHMON PATHWAY Terminals Server Class Requester's Program File PATHCOM Command Terminal TCP INSPECT Server DMON INSPECT Command Terminal Requester's and Server's Source File Server's Program File VST503.
Preparation and Configuration Debugging PATHWAY Applications Preparation and Configuration To take full advantage of Inspect, you should ensure that the server's program file includes symbol information. Consequently, you must include the SYMBOLS compiler directive in the source code or on the command line when you compile the server's source code.
Starting the Debugging Session Debugging PATHWAY Applications Starting a Server in the Hold State Starting a server in the hold state enables you to put breakpoints in it before it begins executing. To start a server in the hold state, you need to set the DEBUG status of its server class before you add the server class.
Guidelines for Debugging Servers Debugging PATHWAY Applications After you enter the DEBUG command, the server enters the hold state as soon as it completes executing the current machine-code instruction. If the server has invoked a procedure, it will not enter the hold state until the procedure returns control to the server. Guidelines for Debugging Servers Because servers are simply processes, the guidelines for debugging processes apply to servers as well.
Preparation and Configuration Debugging PATHWAY Applications Preparation and Configuration To take full advantage of Inspect, you should ensure that your user conversion routines include symbol information. Consequently, you must include the SYMBOLS compiler directive in the source code or on the command line when you compile the source code for the user conversion routines.
Guidelines for Debugging User Conversion Routines Debugging PATHWAY Applications Starting to Debug a Running TCP If you want to debug the user conversion routines in a running TCP, you can start to debug the TCP using one of two methods: You can enter the command interpreter command DEBUG: 17> DEBUG process-id, TERM $INSPECT-command-term If you do not use the TERM clause, Inspect will use the TCP's home terminal as the Inspect command terminal.
Ending the Debugging Session Debugging PATHWAY Applications If you have paused the command interpreter on the Inspect command terminal, you might have to press the BREAK key to signal the command interpreter that it should prompt again.
6 High-Level Inspect Commands This section describes the high-level Inspect commands in detail. The high-level commands are summarized in Table 6-1 on page 6-2. If you want to make full use of high-level Inspect, your program must be compiled with the SYMBOLS compiler directive or have access to an object with symbols. Inspect Keywords Inspect does not reserve its keywords (command names and clause names).
Command Examples High-Level Inspect Commands dependencies are noted where appropriate. For more information about TNS/R related features, see Section 15, Using Inspect on a TNS/R System. Command Examples This section includes examples that show common usage of the high-level Inspect commands. The examples reflect the output format of the current release of Inspect. All commands (except the fix commands) have an optional /OUT file-name/ clause following the command name.
Command Summary High-Level Inspect Commands Table 6-1. High-Level Inspect Commands (page 2 of 5) Command Description ENV Displays one or all the current settings of the Inspect environment parameters. EXIT Stops the Inspect process, therefore terminating the Inspect session. FA Enables you to retrieve, edit, and redefine the replacement string for an existing alias. FB Enables you to retrieve, edit, and replace the definition of an existing code breakpoint in the current program.
Command Summary High-Level Inspect Commands Table 6-1. High-Level Inspect Commands (page 3 of 5) Command Description INFO SEGMENTS Displays information about the extended segments allocated for or by the current program. INFO SIGNALS Displays signal information for the current program. KEY Adds a function-key definition or displays one or all function-key definitions in the function-key list for the current Inspect session. The KEY command is a synonym for the ADD KEY and the LIST KEY commands.
Command Summary High-Level Inspect Commands Table 6-1. High-Level Inspect Commands (page 4 of 5) Command Description SELECT DEBUGGER DEBUG Invokes Debug on the current program. Once you have used this command, you interact with Debug until issuing the Debug command “INSPECT” to return control of the program to Inspect. SELECT LANGUAGE Changes the current source language, changing the acceptable syntax of language-dependent entries.
ADD High-Level Inspect Commands Table 6-1. High-Level Inspect Commands (page 5 of 5) Command Description TRACE Displays the call history for the current program location. VOLUME Sets the default volume and subvolume for expansion of any file names. XC Reissues a command line in the history buffer. ADD The ADD command adds an item to one of the lists of information that Inspect maintains. This diagram shows the complete syntax for the ADD command and its clauses.
ADD ALIAS High-Level Inspect Commands original-name: one of [ \system. ] $volume [ .subvolume [ .file ] ] [ \system. ] $process [ .#qual-1 [ .qual-2 ] ] [ \system. ] cpu, pin [ \system. ] $volume.#number /oss-pathname [/oss-pathname... ] new-name: [\system.] $volume [ .subvolume [ .file ] ] /oss-pathname [/oss-pathname...
ADD ALIAS High-Level Inspect Commands apostrophes ('). To include a quote in a quote-delimited replacement string, use a pair of quotes. Likewise, to include an apostrophe in an apostrophe-delimited replacement string, use a pair of apostrophes. Usage Considerations Restrictions on the Contents of the Replacement String An alias replacement string can refer to other aliases (by name), but it cannot contain the XC command or any of the Fix commands (FA, FB, FC, and FK).
ADD KEY High-Level Inspect Commands will result in this error message being displayed: ** Inspect error 4 ** Effective input record is too long Related Commands ALIAS on page 6-17 DELETE ALIAS on page 6-30 FA on page 6-83 LIST ALIAS on page 6-131 SET ECHO with the ALIAS option on page 6-174 Examples Using the IF command and references to other aliases within an alias: -PRG-ADD ALIAS oldval = "IF x < 99 THEN DISPLAY 'X hack ',X" -PRG-ADD ALIAS xset = "DISPLAY 'X being set to 99';MOD X=99" -PR
ADD PROGRAM High-Level Inspect Commands The command string that the function key will execute ADD KEY key-name [=] command-string key-name: one of F1 F2 F3 F9 F10 F11 SF1 SF2 SF3 SF9 SF10 SF11 F4 F12 SF4 SF12 F5 F13 SF5 SF13 F6 F14 SF6 SF14 F7 F15 SF7 SF15 F8 F16 SF8 SF16 command-string: one of " [ character ]... " ' [ character ]... ' key-name specifies the function key for which you want to provide a definition.
ADD PROGRAM High-Level Inspect Commands control (instead of using the TACL RUND command) or to examine the contents of a save file. ADD PROGRAM { process { save-file [ CODE code-file] [ LIB lib-file] ] [ SRL {(srl-file [ , srl-file,...])}] } process: [\system-name.] { $name | cpu,pin | oss-pid } process specifies a process as the program to add.
ADD PROGRAM High-Level Inspect Commands Usage Considerations PATHWAY Requester Programs To add a PATHWAY requester program to the Inspect program list, you must use the PATHCOM command INSPECT TERM. Cautions When Adding Processes When you use ADD PROGRAM to add a process, the process will not be added to the current Inspect session in these cases: If the Inspect attribute of the process is not set. In this case, the operating system starts a Debug session for the process.
ADD PROGRAM High-Level Inspect Commands The ZZSA file is created in the same subvolume the program is running from. This could be different from your logon subvolume. Enter this command at the TACL prompt: 5>FILEINFO zzsa* Then look for the save file whose modification timestamp matches the time of the abnormal termination. Save Files and Timestamps When Inspect retrieves a save file for analysis, you can receive warning messages giving timestamp information.
ADD SOURCE ASSIGN High-Level Inspect Commands 2. In this example, a new object file is associated with a save file. The new object file might have been compiled with the SYMBOLS compiler directive; the old one was not. --ADD PROGRAM zzsa5362 CODE testprog or --ADD PROGRAM zzsa4513 LIB sort ADD SOURCE ASSIGN The ADD SOURCE ASSIGN command adds a source assignment to the current program’s source assignment list.
ADD SOURCE ASSIGN High-Level Inspect Commands new-name specifies the name of the volume, subvolume, or file where you want Inspect to look for source code when it would normally look in original-name. Note that volume is required. new-name must be qualified down to the same level as original-name. That is, if original-name is a volume, new-name must be a volume; if originalname is a subvolume, new-name must be a subvolume; if original-name is a file or process, new-name must be a file.
ADD SOURCE ASSIGN High-Level Inspect Commands \sys1.$devel.work.v1, and if this source file has been moved to \archive.$source, the assignment is: ADD SOURCE ASSIGN \sys1.$devel, \archive.$source If \sys1 cannot be seen from the system Inspect is running on, you need to use the ADD SOURCE ASSIGN command without specifying the original-name. Alternatively, you can omit the system-name in the original-name. For example: -PROGRAM-ADD SOURCE ASSIGN $OLDVOL.OLDSUBV, \SYS2.$NEWVOL.
ALIAS High-Level Inspect Commands Related Commands DELETE SOURCE ASSIGN on page 6-31 LIST SOURCE ASSIGN on page 6-141 SELECT SOURCE SYSTEM on page 6-169 SOURCE on page 6-196 SOURCE ASSIGN on page 6-202 SOURCE SYSTEM on page 6-211 Examples 1. If the source files have been moved to another volume, but have the same subvolume name, issue a command of this form: ADD SOURCE ASSIGN $oldvol, $newvol 2.
ALIAS High-Level Inspect Commands alias-name specifies the name of the alias. This name can contain up to 31 alphanumeric characters; the first character must be alphabetic. An alias name cannot be the same as an Inspect command name or a command name abbreviation. replacement-string specifies the replacement string to associate with the alias name. The replacement string is a group of zero or more characters enclosed in either quotation marks (") or apostrophes (').
BREAK High-Level Inspect Commands BREAK The BREAK command allows you to display all breakpoints or set one or more breakpoints in the current program. The BREAK command, when used without any parameters, is a synonym for the LIST BREAKPOINT command. BREAK [ breakpoint [ , breakpoint ]...] breakpoint: brk-location [ brk-condition ]... [ brk-action ]...
BREAK High-Level Inspect Commands code-location specifies the location of a code breakpoint. It must be the location of an executable instruction in the user code or user library code. For PATHWAY requester programs, code-location must be in an active scope unit or at the start of an inactive scope unit. BACKUP specifies that the breakpoint refers to the backup process of a fault-tolerant process pair. The BACKUP clause is invalid for PATHWAY requester programs and is not supported on TNS/E systems.
BREAK High-Level Inspect Commands WRITE READ specifies that a break event should occur on both read and write access of the data item. ABEND specifies a break on ABEND is a break on the event for the process being debugged, not the system procedure. The ABEND clause is invalid for PATHWAY requester programs. STOP specifies a break on STOP is a break on the event for the process being debugged, not the system procedure. The STOP clause is invalid for PATHWAY requester programs.
BREAK High-Level Inspect Commands THEN { command-string | alias-name } directs Inspect to execute a list of commands when the breakpoint triggers a break event. This list of commands is defined either by an explicit command string or by an alias name. command-string is an Inspect command list enclosed in either quotation marks (") or apostrophes ('). alias-name is the name of an alias whose replacement text is a command list.
BREAK High-Level Inspect Commands This item is qualified using the scope path current at breakpoint definition: Identifiers used to specify the break location These items are qualified using the input radix and the scope path current at breakpoint activation: Numbers appearing in the expression of the IF clause Identifiers appearing in the expression of the IF clause Identifiers appearing in the command string of the THEN clause Debugging Loops When debugging loops, you can use the EVERY
BREAK High-Level Inspect Commands For example, this breakpoint generates break events on its 10th, 20th, and 30th activations, and is then cleared: BREAK para-1 EVERY 10 TEMP 3 Using the THEN Clause The THEN clause, which requires quotes, enables you to execute a list of commands whenever a break event is triggered. If you use RESUME in the command list (it must be the last command in the list), Inspect resumes execution of the current program.
BREAK High-Level Inspect Commands Write Availability Write breakpoints are available on all TNS processors, but not on NSR-L processors.
BREAK High-Level Inspect Commands This illustrates how to set a data breakpoint on a local variable to avoid unrelated data breakpoints being reported for the local variable when the procedure is no longer active. #10 #11 #12 #13 #14 #42 PROC X; BEGIN INT I; CALL Y(i); . . . END; -PROGRAM-BREAK #X THEN "BREAK I;RESUME" -PROGRAM-BREAK #X.
CD High-Level Inspect Commands Example This example illustrates a frequent use of the THEN clause—modifying a variable and then continuing execution: -PRG-BREAK rachets+3I THEN "MODIFY fsize:=15; RESUME" CD The CD command changes the current OSS directory. CD [ oss-pathname ] oss-pathname specifies an OSS pathname. Default Value If the oss-pathname is omitted, the current OSS directory is changed to your initial OSS directory.
Related Commands High-Level Inspect Commands breakpoint-number specifies the number of the breakpoint to clear. code-location specifies the location of a code breakpoint. It must be the location of an executable instruction in the user code or user library code. data-location specifies the location of a data breakpoint. Related Commands BREAK on page 6-19 LIST BREAKPOINT on page 6-131 COMMENT The COMMENT command directs Inspect to ignore the remainder of the command list.
DELETE High-Level Inspect Commands 2. This is an example of an invalid comment; Inspect will issue an invalid syntax error. -PROG-BREAK X COMMENT BREAK when X changes. 3. This is an example of a comment using “--”. -PROG-BREAK X -- BREAK when X changes. DELETE The DELETE command removes an item from one of the lists of information that Inspect maintains. This diagram shows the complete syntax for the DELETE command and its clauses.
DELETE ALIAS High-Level Inspect Commands DELETE ALIAS The DELETE ALIAS command removes one or all aliases from the alias list for the current Inspect session. DELETE ALIAS[ES] { * | alias-name } * directs Inspect to remove all aliases. alias-name directs Inspect to remove a specific alias. Usage Consideration Aliases are not expanded following the keywords DELETE ALIAS.
Related Commands High-Level Inspect Commands key-name directs Inspect to remove a specific function-key definition. Valid key names include F1 through F16 and shifted F1 (SF1) through shifted F16 (SF16). Related Commands ADD KEY on page 6-9 KEY on page 6-128 LIST KEY on page 6-136 DELETE SOURCE ASSIGN The DELETE SOURCE ASSIGN command removes one or all source assignments from the current program's source assignment list.
Related Commands High-Level Inspect Commands Related Commands ADD SOURCE ASSIGN on page 6-14 LIST SOURCE ASSIGN on page 6-141 SOURCE ASSIGN on page 6-202 DELETE SOURCE OPEN The DELETE SOURCE OPEN command closes one or all source files that Inspect had opened as the result of previous SOURCE commands. DELETE SOURCE OPEN[S] { * | source-file } * directs Inspect to close all open source files. source-file directs Inspect to close a specific source file.
DISPLAY High-Level Inspect Commands DISPLAY The DISPLAY command formats and displays these types of items: Data location, including SPI buffers and tokens Program registers (TNS and TNS/R) Program code Quoted strings Expressions (after evaluating them) Integral values (as a specified data type) In addition, the DISPLAY command provides several clauses that enable you to control the size, type, and formatting of the items you display.
DISPLAY High-Level Inspect Commands display-type: one of CHAR FILENAME INT PROCESS HANDLE SSID TIMESTAMP48 USERNAME CRTPID FILENAME32 INT16 REAL STRING TOSVERSION DEVICE FIXED INT32 REAL32 SYSTEM TRANSID ENV FLOAT LOCATION REAL64 TIMESTAMP USERID for-spec: for-count [ BYTE[S] | WORD[S] | DOUBLE[S] | QUAD[S] ] display-code: one of scope-path [ scope-path ] code-reference code-reference: one of scope-unit [ FROM source-file ] label [ FROM source-file ] #line-number [ (source-file) ] for-count: one
DISPLAY High-Level Inspect Commands one of tns/r-register-name: $0 $1 $2 $3...$31 $HI $LO $PC tns/r-register-alias tns/r-register-alias: $AT $S0 $T0 $K0 $V0 $S1 $T1 $K1 $V1 $S2 $T2 $GP one of $A0 $S3 $T3 $SP $A1 $S4 $T4 $FP $A2 $S5 $T5 $RA $A3 $S6 $T6 $S7 $T7 $T8 spi-buffer: data-location TYPE spi-type spi-type: EMS spi-token: one of EMS-NUM SPI SPI-NUM data-location : token-spec [ TYPE spi-type ] [ POSITION token-spec [ , token-spec ]...
DISPLAY High-Level Inspect Commands base: one of BINARY ASCII ICODE OCT[AL] XASCII DEC[IMAL] GRAPHIC[S] HEX[ADECIMAL] format-list: an edit-descriptor list for the operating system formatter mask-string: a mask string for the M edit descriptor These subsections show you how to use the DISPLAY command to display different types of items: Displaying Program Data on page 6-37 Displaying Program Registers on page 6-42 Displaying Program Code on page 6-45 Displaying SPI Data on page 6-48 Displ
Displaying Program Data High-Level Inspect Commands Displaying Program Data DISPLAY command is used to format and display data in the current program, including SPI buffers and tokens. Note. Data location is different for different languages. For more information, see languagespecific sections. This subsection shows how to display non-SPI data. Displaying SPI Data on page 6-48 shows how to display SPI data. DISPLAY item [ , item ]...
Displaying Program Data High-Level Inspect Commands Inspect ignores the WHOLE clause if you use the FOR or IN ICODE clause. The WHOLE clause is also invalid for PATHWAY requester programs. The PLAIN clause directs Inspect to suppress the identifying information it normally displays for an item, including: The name of the item The names of the elements of a group item The quotation marks that delimit string values The FOR clause directs Inspect to display the specified number of elements.
Default Value High-Level Inspect Commands SG specifies that the 16-bit expression is interpreted as a System Global address. SG is not allowed with 32-bit addresses. identifier specifies a variable defined by the program. The form of identifier allowed is any legal variable specification, such as i, struct.r1.r2, or a[30]. For more information, see Using the TYPE Clause on page 6-75. formatting-clause specifies the format Inspect should use when displaying each item.
Examples High-Level Inspect Commands Items declared as arrays are displayed using the subscript range specified in the command. If none is specified, then the items are displayed in their entirety. A one-dimensional item is displayed as a row of values, the name indicating the beginning subscript value. For example, assume this COBOL definition: 01 person-name. 03 last-n. 05 last-char PICTURE X OCCURS 20 TIMES. 03 rest. 05 first-char PICTURE X OCCURS 20 TIMES.
Examples High-Level Inspect Commands 2. This example shows the usage of the WHOLE clause with the DISPLAY command on the same array of 8 elements. Specifying the WHOLE clause will cause the elements in the array to be displayed in string format. -EX2OBJ-DISPLAY arr WHOLE ARR[0] = "09" ?0 ?5 ?0 "{" ?0 ?2 ?3 ?133 ?0 "Y" ?2 "7" ?0 ?0 3. This example shows the usage of the PLAIN clause with the DISPLAY command on the same array of 8 elements.
Displaying Program Registers High-Level Inspect Commands Displaying Program Registers You can use the DISPLAY command to format and display registers in the current program. For accelerated programs, you can use this command to display the values of TNS machine registers. Note. The DISPLAY REGISTER command is invalid for PATHWAY requester programs. DISPLAY item [ , item ]...
Displaying Program Registers High-Level Inspect Commands tns/r-register-alias: $AT $S0 $T0 $K0 $V0 $S1 $T1 $K1 $V1 $S2 $T2 $GP one of $A0 $S3 $T3 $SP $A1 $S4 $T4 $FP $A2 $S5 $T5 $RA $A3 $S6 $T6 $S7 $T7 $T8 $T9 formatting-clause: one of IN base [ base ]... { FORMAT | FMT } format-list PIC mask-string [ , mask-string ]... item [ , item ]... specifies the list of items to display. Inspect determines the default display format of an item based on the type of value that the item represents.
Usage Considerations High-Level Inspect Commands these clauses, see Using the FORMAT Clause on page 6-67, Using the IN Clause on page 6-70, and Using the PIC Clause on page 6-73. Usage Considerations When debugging an emulated TNS program on a TNS/E system, the DISPLAY command cannot display TNS/E registers. You must use either Visual Inspect or Native Inspect to display TNS/E registers.
Examples High-Level Inspect Commands Examples 1. This command displays all TNS registers in octal: -C000OTCE-DISPLAY REGISTER ALL IN OCTAL R0 %077777 RH P = %003105 R1 %174030 RG E = %000207 (RP=7,CCG,T) R2 %105260 RF L = %005022 R3 %144402 RE R4 %107571 RD S = %005034 R5 %011674 RC R6 %160413 RB SPACE = %000000 UC.0 R7 %062400 RA <-- 2.
Displaying Program Code High-Level Inspect Commands formatting-clause: one of IN base [ base ]... { FORMAT | FMT } format-list PIC mask-string [ , mask-string ]... item [ , item ] specifies the list of items to display. Inspect determines the default display format of an item based on the type of value that the item represents. display-code specifies a code location to display. scope-path and code-referenceare described in Section 2, Inspect Concepts.
Usage Considerations High-Level Inspect Commands Usage Considerations You can display code from user library routines if you have read access to the code file. The ICODE command provides a more powerful mechanism for displaying program code. Example This example illustrates the differences between using the DISPLAY and ICODE commands to display program code. Note that the ICODE output indicates which source line numbers correspond to which instructions.
Displaying SPI Data High-Level Inspect Commands Displaying SPI Data You can use the DISPLAY command to format and display SPI buffers and SPI tokens in the current program. DISPLAY item [ , item ]... [ IN base [ base ]...
Displaying SPI Data High-Level Inspect Commands The data-location parameter specifies the location of the SPI buffer, and the TYPE clause specifies how you want Inspect to interpret and format the buffer. Here are the SPI types that Inspect supports: EMS directs Inspect to interpret the buffer as an EMS buffer and presents its contents in a labelled format. EMS-NUM directs Inspect to interpret the buffer as an EMS buffer and presents its contents in a numeric format.
Displaying SPI Data High-Level Inspect Commands spi-token specifies the location of the SPI token or list. The syntax for spi-token is: data-location : token-spec [ TYPE spi-type ] [ POSITION token-spec [ , token-spec ]... ] The data-location parameter specifies the location of the SPI buffer containing the token or list, and the TYPE clause specifies how you want Inspect to interpret and format the buffer. For the SPI types that Inspect supports refer to the spi-type discussion above.
General Usage Considerations High-Level Inspect Commands SSID ssid-string specifies a subsystem ID for the token or list. The said-string parameter is a string enclosed by quotation marks. It has one of these forms: "owner.subsys-name.version" "owner.subsys-number.version" owner is an eight-character ASCII string that identifies the name of the company or organization providing the definition for the token. Owner corresponds to the Z-OWNER field in the subsystem ID structure.
Usage Considerations When Displaying an SPI Buffer High-Level Inspect Commands SPI Types in the TYPE Clause If you specify SPI or SPI-NUM as the SPI type, Inspect uses the SSGET system procedure to extract information from the SPI command or response buffer. If you specify EMS or EMS-NUM as the SPI type, Inspect uses the EMSGET system procedure to extract information from the event-message buffer.
Usage Considerations When Displaying an SPI Token or List High-Level Inspect Commands Usage Considerations When Displaying an SPI Token or List Inspect always points to the start of the SPI buffer, unless you specify zero for token-index or the POSITION clause. If you access the SPI buffer with Inspect, the current position in the SPI buffer does not change. If you specify zero for token-index, Inspect searches for the requested token beginning at the current position in the buffer.
Examples that Display SPI Buffers High-Level Inspect Commands Table 6-2. SPI Token Formatting by the DISPLAY Command (page 2 of 2) Token Type Formatting Description FNAME [\system.] FNAME32 \system.$volume.subvolume.
Examples that Display SPI Buffers High-Level Inspect Commands asterisk marks the token at the current position in the buffer.
High-Level Inspect Commands Examples that Display SPI Tokens and Lists 3. This command displays a user-defined command and response buffer named SPIBUFFER: -OBJ-DISPLAY spi-buffer TYPE SPI-NUM ZSPI-TKN-HDRTYPE = 0 (ZSPI-VAL-CMDHDR) ZSPI-TKN-CHECKSUM = 0 ZSPI-TKN-COMMAND = 2 ZSPI-TKN-LASTERR = 0 (ZSPI-ERR-OK) - Operation successful ZSPI-TKN-LASTERRCODE = 486866497 (29,4,-506) ZSPI-TKN-MAX-FIELD-VERSION = 0 ZSPI-TKN-MAX-RESP = 0 ZSPI-TKN-OBJECT-TYPE = 10 ZSPI-TKN-SERVER-VERSION = 0 ZSPI-TKN-SSID = CUST.600.
High-Level Inspect Commands Examples that Display SPI Tokens and Lists 4. This command displays a token within an error list that is also within a second error list in SPI-BUFFER. The first POSITION parameter positions Inspect within the first error list, and the second POSITION parameter positions Inspect within the second error list.
High-Level Inspect Commands Displaying Strings, Expressions, and Constant Values Displaying Strings, Expressions, and Constant Values You can use the DISPLAY command to format and display strings, expressions (after Inspect evaluates them), and constant values. You can use the FORMAT, IN, and PIC clauses to format any of these items. You can also use the TYPE clause to format constant values. DISPLAY item [ , item ]...
Usage Guidelines High-Level Inspect Commands VALUE value-list [ TYPE display-type ] specifies a list of one, two, or four integer values to display. The TYPE clause causes Inspect to display the values using the attributes of a specific display type. For more information about the TYPE clause, see formatting-clause specifies the format Inspect should use when displaying each item. Inspect provides three format clauses: FORMAT, IN, and PIC.
Examples High-Level Inspect Commands 4. This shows a legal and illegal system value. If the system number is not legal or if it does not match a system number on the current network, Inspect displays --DISPLAY VALUE 42 TYPE SYSTEM \SYS --DISPLAY VALUE 12345 TYPE SYSTEM \?? 5. This example illustrates using the VALUE clause with the TYPE clause for TIMESTAMP48. --DISPLAY VALUE 0,8,62563,12864 TYPE TIMESTAMP48 1987-03-09 09:00:00.00 6.
Using the AS Clause High-Level Inspect Commands 12. This is an example of using an apostrophe in an apostrophe-delimited string. -PROGRAM-DISPLAY 'T''s value is ', T PLAIN "T's value is ", 53 13. This example shows the use of displaying a string with the IN clause. -PROGRAM-DISPLAY "Hello" IN OCTAL %110 %145 %154 %154 %157 14. The next example shows the use of displaying a simple expression. -PROGRAM-DISPLAY (132 + 98) 230 15. This example shows the use of expressions with the IN clause.
Using the AS Clause High-Level Inspect Commands AS data-type directs Inspect to display the item using the attributes of the given data type. The data-type parameter is a data type identifier or a variable. If data-type refers to a variable, Inspect uses the type attributes of that variable. data-location specifies the memory location starting at which data is to be formatted as datatype. ( expression ) specifies a memory address.
Using the AS Clause High-Level Inspect Commands one_var.one_field := 53; one_var.two_field := 102; two_var ':=' "Hello World"; @string_ptr := @two_var; @int_ptr := @one_var; address_ext := $XADR(one_var); address_word := @one_var; extended_array ':=' [17, 18]; END; 1. This example uses the AS clause with a structure variable. -PROGRAM-DISPLAY int_ptr AS one_var ONE_VAR = ONE_FIELD = 53 TWO_FIELD = 102 2. This example uses the AS clause with a structure template.
Using the FOR Clause High-Level Inspect Commands 5. This example uses the AS clause when the data address is already known. -PROGRAM-DISPLAY address_word ADDRESS_WORD = 1 -PROGRAM-DISPLAY address_ext ADDRESS_EXT = 2 -PROGRAM-DISPLAY (@extended_array) 524294 -PROGRAM-DISPLAY (1) AS s^def S^DEF = ONE_FIELD = 53 TWO_FIELD = 102 -PROGRAM-DISPLAY (2D) AS s^def S^DEF = ONE_FIELD = 53 TWO_FIELD = 102 -PROGRAM-DISPLAY (524294) AS s^def S^DEF = ONE_FIELD = 17 TWO_FIELD = 18 6.
Usage Considerations High-Level Inspect Commands { display-data FOR for-spec } DISPLAY { display-code FOR for-spec } { spi-token FOR for-count } for-spec: for-count [ BYTE[S] | WORD[S] | DOUBLE[S] | QUAD[S] ] for-count: one of expression data-location for-spec defines the format of the groups as a specific number of units. To specify the number, you can use an integer or a data location that contains an integer value.
Examples High-Level Inspect Commands Using FOR with FORMAT and PIC When you use the FOR clause with the FORMAT or PIC clauses, the FOR clause determines how much data to display and the FORMAT or PIC clause determines how to format the data. Examples The FOR clause examples are based on this TAL source code.
Using the FORMAT Clause High-Level Inspect Commands 4. This example displays eight bytes of str in hexadecimal. -PROGRAM-DISPLAY str FOR 8 IN HEX STR[0] = %H45 %H78 %H61 %H6D %H70 %H6C %H65 %H20 5. This example displays the first 33 (value of str^blen) bytes of str. -PROGRAM-DISPLAY str FOR str^blen STR[0] = "Example text number two" 6. This example displays the first 10 words of struct^x in ASCII (note that “-” is the ASCII equivalent of 45, which is the value of struct^x.i).
Examples High-Level Inspect Commands { FORMAT | FMT } format-list directs Inspect to format items using the operating system formatter. format-list is a list of edit descriptors (with optional modifiers, decorations, and so on), separated by commas. The edit descriptors available in HP FORTRAN are also available in Inspect. The operating system formatter provides several additional descriptors. For more information, see the Guardian Programmer’s Guide.
Examples High-Level Inspect Commands 1. In this example, the integer array I is displayed. The second instance uses the FORMAT clause to display I as eight seven-digit integers using the I edit descriptor. -FOROBJ-DISPLAY i I[1] = 1 2 3 4 5 6 7 8 -FOROBJ-DISPLAY i FORMAT (8I7) 1 2 3 4 5 6 7 8 2. In this example, the real array X is displayed. The second instance uses the FORMAT clause with the repeatable edit descriptors E, F and G to display X as various ten-digit fields. -FOROBJ-DISPLAY x X[1] = 3.
Using the IN Clause High-Level Inspect Commands 5. This example shows the character string STRINGVAR is displayed. The second instance uses the A edit descriptor. The third instance adds the characters “e!” to the output being displayed.
Using the IN Clause High-Level Inspect Commands DECIMAL displays items as decimal values. HEXADECIMAL displays items as hexadecimal values. ASCII displays items as printable 7-bit ASCII characters. Inspect represents unprintable characters as a question mark followed by the character's numeric value expressed in the current output radix. For the ASCII base, unprintable characters are those with a decimal value less than 32 or greater than 126.
Using the IN Clause High-Level Inspect Commands 3. This example illustrates using the IN clause with the FOR clause. -PROGRAM-DISPLAY string_ptr IN a FOR 5 STRING_PTR = "Hello" 4. This TAL source code was used to generate this example. PROC CODELOC; BEGIN INT VARONE = 'P' := "LOCAL P RELATIVE ARRAY"; ! 11 WORDS INT VARTWO,I; END; 5. This example illustrates using the FOR clause with the IN clause to display a codelocation in both ASCII and ICODE.
Using the PIC Clause High-Level Inspect Commands Using the PIC Clause The PIC clause directs Inspect to format a list of items using mask strings and the M edit descriptor of the operating system formatter. The M edit descriptor provides a formatting mechanism called “mask formatting,” which is similar to the COBOL PICTURE clause. For more information, consult the formatter documentation in the Guardian Programmer’s Guide. DISPLAY item [ , item ]... PIC mask-str [ , mask-str ]...
Using the PIC Clause High-Level Inspect Commands Usage Considerations Size Limits on DISPLAY PIC Formatting Displays using the PIC clause cannot exceed one screen (24 lines) or 3168 bytes of data. If these limits have been exceeded, the data is displayed and Inspect issues this warning message: ** Inspect warning 87 ** Maximum lines exceeded for format output Differences between PIC and PICTURE Note that there are significant differences between the INSPECT PIC clause and the COBOL PICTURE clause.
Using the TYPE Clause High-Level Inspect Commands 1. This example displays sub-elements of ARR1 using the PIC clause. -PROGRAM-DISPLAY arr1 PIC "ZZZ999" 12345 005 123 02 2. This example displays var1 and arr1 with decimal alignment as stated in the PIC clause. -PROGRAM-DISPLAY var1 PIC "ZZ99.99" 02.00 -PROGRAM-DISPLAY arr1 PIC "ZZZ.99" 123.45 05 1.23 2 3. This example displays arr1 with implied decimal alignment as stated in the PIC clause. -PROGRAM-DISPLAY arr1 PIC "ZZZZZV99" 12345 05 123 2 4.
Using the TYPE Clause High-Level Inspect Commands DISPLAY item [ TYPE display-type ] item: one of data-location REGISTER register-item VALUE value-list display-type: one of CRTPID FILENAME32 SYSTEM TRANSID DEVICE LOCATION TIMESTAMP USERID ENV PROCESS HANDLE TIMESTAMP48 USERNAME FILENAME SSID TOSVERSION item specifies the item you want to display. You can specify a data address, a program register, or a list of values as the item.
Using the TYPE Clause High-Level Inspect Commands The first form represents a permanent file and the second form represents a temporary file. FILENAME32 interprets the item as a 32-byte internal file name and displays it in one of these forms: \system.$volume.subvolume.filename \system.$volume.#number The first form represents a permanent file and the second form represents a temporary file.
Using the TYPE Clause High-Level Inspect Commands TIMESTAMP interprets the item as a 64-bit timestamp and displays it in one of these forms: year-month-day hour:min:sec:millisec:microsec n days, n hours, n min, n sec, n millisec, n microsec The first form represents a date and time and the second form represents elapsed time. Inspect uses elapsed time if the year is less than one.
Using the TYPE Clause High-Level Inspect Commands Using TYPE with REGISTER When you use the TYPE clause with the REGISTER clause, you can only specify display types that represent 2byte values. Using TYPE with VALUE When you use the TYPE clause with the VALUE clause, you must ensure that the size of the values you provide matches the size of the display type you specify. Display types CRTPID, DEVICE, FILENAME, FILENAME32, PROCESS HANDLE, SSID, and USERNAME may not be used with VALUE.
Using the TYPE Clause High-Level Inspect Commands 5. This example displays a TYPE FILENAME32. -PROGRAM-DISPLAY variable TYPE FILENAME32 \SYS.$DISK.SUBVOL.FILENAME 6. This example displays a TYPE LOCATION. -PROGRAM-DISPLAY variable TYPE LOCATION #TEST^PROC.7 + %3I, #TEST^PROC.#223.2(\SYS.$DATA.SUBVOL.FILENAME) + %3I, #TEST^PROC + %1030I -PROGRAM-DISPLAY variable TYPE LOCATION UC.3 #READ^INFO.15 + %5I, #READ.INFO.#553(\SYS.$DATA.SUBVOL.FILENAME) + %5I, #READ^INFO + %756I 7.
ENV High-Level Inspect Commands 13. This example displays a TYPE TRANSID. -PROGRAM-DISPLAY variable TYPE TRANSID \SYS.14.904 14. This example displays a TYPE USERID. -PROGRAM-DISPLAY variable TYPE USERID 255,255 SUPER.SUPER 15. This example displays a TYPE USERNAME. -PROGRAM-DISPLAY variable TYPE USERNAME SUPER.SUPER 255,255 ENV The ENV command displays the current settings of the Inspect environment and selectable parameters.
Related Commands High-Level Inspect Commands Default Volume and Subvolume If an Inspect session starts as a result of a debug event—for example, RUND PRG—Inspect uses your logon volume and subvolume as the default volume and subvolume for the session. If you start an Inspect session using the TACL command RUN INSPECT, then Inspect uses your current volume and subvolume as the default volume and subvolume.
FA High-Level Inspect Commands If you issue an EXIT command interactively and one or more active processes are running under the control of Inspect, Inspect displays a warning message. Inspect emits a second warning message if you have any breakpoints set. For example: -PROGRAM-EXIT WARNING - You have 2 active processes: Program Num PID Name Type State Location 1 01,00307 X003OBJ1 TNS HOLD #X001A.#27.4(X003TAL) + %2I *2 09,00282 X003OBJ0 TNS HOLD #main.
Example High-Level Inspect Commands LIST ALIAS on page 6-131 Example This example illustrates the FA command. -PRG-FA ShowVars -ADD ALIAS SHOWVARS = "DISPLAY height, width, depth" . ddddiWatch// i; RESUME -ADD ALIAS WatchVARS = "DISPLAY height, width, depth; RESUME" . FB The FB (“Fix Breakpoint”) command enables you to retrieve, edit, and reissue an existing breakpoint definition.
Default Value High-Level Inspect Commands When you enter an FC command, Inspect presents the specified command line (up to 255 characters) in an editing template. Inspect will issue a warning if you exceed 255 characters on an insert or a replace. For more information, see Editing Templates on page 6-85. FC [ command-line-specifier ] command-line-specifier: one of pos-num neg-num search-text "search-text" cmd-line-specifier specifies which command line to retrieve from the history buffer.
Default Value High-Level Inspect Commands When you use one of the Fix commands—FA, FB, FC, or FK—Inspect retrieves a command line and presents it in an editing template. You can then alter and reissue the command or command line. A editing template has the form: -current template contents . The first line is the contents line; it displays the text that you are editing. The second line is the editing line; here, you enter replacement text and editing commands.
Default Value High-Level Inspect Commands In the example, the D commands delete “SHOW”; the first I command inserts a “Watch” before “VARS.” The two slashes indicate the end of this insertion. The second I command inserts the string “; RESUME” before the quotation mark that terminates the alias's replacement string. After you press the RETURN key, Inspect redisplays the editing template and prompts you for any further changes.
Default Value High-Level Inspect Commands Example This example illustrates the FC command: --ALIAS mult ="display (5*5)" --key f1 = "resume" --set radix output octal --history 1: ALIAS mult ="display (5*5)" 2: KEY F1 = "resume" 3: SET RADIX output octal --fc 1 -ALIAS mult ="DISPLAY (5*5)". 6 -ALIAS mult ="DISPLAY (5*6)" . --FC -2 -SET RADIX output octal. rdecimal -SET RADIX output decimal .
FILES High-Level Inspect Commands FILES The FILES command shows the status of files that have been opened by the current program. The FILES command is a synonym for the INFO OPENS command. Note. The FILES command is invalid for PATHWAY requester programs. FILES [ { * | file-list } [ DETAIL ] [ file-type ] file-list file-number file-type: [, file-number ]... one of FORTRAN FD GUARDIAN * requests the status of all files opened by the current program. file-list requests the status of specific files.
FK High-Level Inspect Commands FORTRAN indicates that file-number values specify FORTRAN logical-unit numbers, not file system file numbers. Files without FORTRAN logical units will not be displayed. The F clause is valid only in FORTRAN scope units. FD indicates that file-number values specify OSS file descriptors. Files without OSS file descriptors will not be displayed. GUARDIAN indicates that file-number values specify Guardian system file numbers.
Related Commands High-Level Inspect Commands Related Commands ADD KEY on page 6-9 DELETE KEY on page 6-30 KEY on page 6-128 LIST KEY on page 6-136 HELP The HELP command displays information about Inspect commands, features, and concepts. HELP text is organized in a hierarchical fashion; general topics at the top level, with more specific subtopics at each lower level.
Usage Guidelines High-Level Inspect Commands Help Subtopics The HELP command provides subtopic options within topic descriptions. Subtopics might include: Command descriptions Syntax Examples Usage considerations Related commands Default values Errors To receive information on a specific error, at the first-level Inspect HELP prompt enter: Error num More Help ([Y]/N)? prompt When you request help for a topic, Inspect displays information for the topic.
HISTORY High-Level Inspect Commands HISTORY The HISTORY command displays the most recently executed command lines. HISTORY [ num ] num is the number of commands to display. Default Value If no number is specified, the last 10 commands are displayed. Usage Consideration The HISTORY command is equivalent to LIST HISTORY -num/-1, except when less than num command lines are in the history buffer, in which case all lines in the history buffer are displayed.
Default Value High-Level Inspect Commands PROGRAM command). cpu,pin identifies a process by its process ID. PATHWAY-term-name identifies a PATHWAY requester program by the name of its logical PATHWAY terminal. * specifies all executable programs in the program list. Default Value Entering HOLD without parameters suspends the current program. Usage Considerations Holding a Program When a program enters the hold state, it becomes the current program.
ICODE High-Level Inspect Commands ICODE location [ FOR count [ unit ] ] [ report ] location: one of [ AT display-code ] [ tns/r tns/r-address-expression ] [ tns-address-expression ] [ UC.number | UL.number ] unit: one of INSTRUCTION[S] STATEMENT[S] VERB[S] report: one of TNS tns/r BOTH tns/r: one of TNSR TNS/R R tns/r-address-expression: tns/r-value [ operator tns/r-value ]... tns-address-expression: tns-value [ operator tns-value ]...
ICODE High-Level Inspect Commands AT display-code specifies a source-level code location (such as a line number) starting at which instructions are to be listed. TNS/R tns/r-address-expression specifies the TNS/R machine address, for accelerated or native programs, starting at which instructions are to be listed. tns-address-expression [ UC.number | UL.number ] specifies the TNS code address beginning where instructions are to be listed. The code segment number must be in the range zero through 31.
Default Values High-Level Inspect Commands BOTH instructs the ICODE command to list the correspondence between TNS and TNS/R instructions for accelerated programs. Refer to the examples for more details. The BOTH option does not show TNS/E instructions for an OCA process on a TNS/E system. Default Values INSTRUCTIONS are assumed if no unit is specified and an address expression is specified.
Usage Considerations High-Level Inspect Commands Usage Considerations The AT clause and the STATEMENTS and VERBS units can only be used when symbol information is available. If the AT clause is used with a line number for which there is no corresponding statement, a warning is issued and the next line number for which there is a corresponding statement is assumed. When a code source-level location is specified, instructions cannot be listed past the end of the containing procedure.
Related Command High-Level Inspect Commands If the location at the end of the range is not an exact point, instructions are listed till the next exact point and this warning is issued: ** Inspect warning 387 ** Ending location is not a memory-exact point; listing ends at following memory-exact point If a TNS/R code address that is not 32-bit aligned is input, it is rounded up to the next 32-bit boundary and this warning is issued: ** Inspect warning 389 ** Address is not aligned to a TNS/R instru
Examples High-Level Inspect Commands 2. This illustrates listing TNS instructions starting at a given line for two statements. Note that pressing RETURN lists the ICODE of two additional statements. -OTALIN- ICODE at #73 for 2s #73 %000052: LDI +001 %000055: ADDS +002 %000060: PUSH 711 #75.1 %000061: LDI +001 -OTALIN#76 %000063: LDI +001 #77 %000065: BSUB -033 ADDS LDI -002 +010 STOR G+000 STOR L+001 RSUB LDI 01 +000 3. This illustrates listing TNS instructions starting at a given TNS address.
Examples High-Level Inspect Commands 6. This command lists the correspondence between TNS instructions and TNS/R instructions starting at TNS address %75 and extending for 11 TNS instructions.
IDENTIFIER High-Level Inspect Commands IDENTIFIER The IDENTIFIER command displays information about the internal characteristics of a given data location or of all data locations in one or more scope units. The IDENTIFIER command is a synonym for the INFO IDENTIFIER command. IDENTIFIER { * | identifier-spec: [ scope-path. scope-path #data-block ##GLOBAL identifier-spec } one of ] identifier [ .identifier ]... * specifies all identifiers in the scope unit identified by the current scope path.
IF High-Level Inspect Commands IF The IF command provides conditional execution of an Inspect command. IF expression THEN { command | alias-name } expression specifies the expression that must evaluate to TRUE (that is, a nonzero value) before Inspect will execute the command or alias following THEN. command is any Inspect command except FA, FB, FC, FK, or XC. alias-name is the name of a previously defined alias. The replacement string for the given alias must be a valid command list.
INFO High-Level Inspect Commands Given the TAL declaration: INT Animal[0:3] := "bird"; then for an expression to evaluate to TRUE, the IF command must be entered as follows: IF Animal[0] = "b" AND Animal[1] = "i" AND & Animal[2] = "r" AND Animal[3] = "d" & THEN DISPLAY Tree;RESUME INFO The INFO command displays information about various types of items in the current program. This diagram shows the complete syntax for the INFO command and its clauses.
INFO IDENTIFIER High-Level Inspect Commands INFO IDENTIFIER The INFO IDENTIFIER command displays information about the internal characteristics of a given data location or of all data locations in one or more scope units, including native symbols. INFO IDENTIFIER { * | identifier-spec } identifier-spec: one of [ scope-path. ] identifier [ .identifier ]... scope-path #data-block ##GLOBAL * specifies all identifiers in the scope unit identified by the current scope path.
Usage Considerations High-Level Inspect Commands Types of Entities The form of the output produced by INFO IDENTIFIER for a given identifier depends on the type of entity the identifier denotes.
Related Commands High-Level Inspect Commands COMPLEX Complex DEFINED TYPE Defined type LOGICAL Logical NUM LD EM Numeric, sign leading, embedded NUM LD SP Numeric, sign leading, separate NUM TR EM Numeric, sign trailing, embedded NUM TR SP Numeric, sign trailing, separate NUM UNSIGN Numeric unsigned PAK SIGNED Packed numeric signed PAK UNSIGN Pack numeric unsigned REAL Real WORD STRUCT Word-addressed structure Note that these data types do not correspond exactly to any one language
INFO LOCATION High-Level Inspect Commands 2. A FORTRAN real variable named P will have these attributes: -PRG-INFO IDENTIFIER p P: VARIABLE storage^info: TYPE=REAL, ELEMENT LEN=32 BITS, UNIT SIZE=1 ELEMENTS access^info: 'L' + %15 WORDS 3. A TAL integer array named D^ARRAY could have these attributes: -PRG-INFO IDENTIFIER d^array D^ARRAY: VARIABLE storage^info: TYPE=BIN SIGN, ELEMENT LEN=16 BITS, UNIT SIZE=1 ELEMENTS access^info: 'L' + 1 WORD dimension^info: [0:9] 4.
Default Values High-Level Inspect Commands scope-spec: one of scope-path specifies a scope unit by name. scope-ordinal specifies a scope unit by its scope number as displayed by the TRACE command. Default Values If you enter INFO LOCATION alone, Inspect uses the current scope path to determine what statement to use: If the current scope path denotes an active scope unit, the INFO LOCATION command provides information about the statement containing the current code location in the scope unit.
Usage Considerations for Accelerated Programs High-Level Inspect Commands statement. Merged indicates that the compiler merged the statement with one or more other statements. You cannot set a breakpoint on a deleted statement; you can set one on a merged statement.
Example High-Level Inspect Commands Example This example output illustrates, for accelerated programs, the inclusion of the indication of whether or not a statement is a register-exact point. Scope: M Compile File: 12:15:20.02 Num 1 2 3 4 5 Line #41 #52 #52 #52 #64 $GOLF.GREEN.
Output High-Level Inspect Commands Output This output template illustrates the INFO OBJECTFILE command: [ Library | Program]Object File: filename General Information [ [ [ [ [ [ [ [ [ [ [ BINDER Region: YES | NO BINDER Timestamp: timestamp NLD Timestamp: timestamp Data Pages: integer Debugger: DEBUG | INSPECT INSPECT Region: YES | NO System Type: GUARDIAN | OSS Process Subtype: integer Program File Segment: integer WORDS Highrequesters: ON | OFF Runnamed: ON | OFF Highpin: ON | OFF Saveabend: ON | OFF S
Examples High-Level Inspect Commands If a program has a user library, information is listed for the program file and the library file. If the filename parameter is omitted, Inspect will display information about all object files used by the current process (user code plus all libraries plus all system files).
INFO OPENS High-Level Inspect Commands 3. This example illustrates the information the INFO OBJECTFILE command presents for a TNS/R program using SRLs. -DEMO-INFO OBJECT Program Object File: \FOLK.$LORE.EXAMPLE.DEMO General Information NLD Timestamp: Debugger: Process Subtype: Program File Segment: Highrequesters: Runnamed: Highpin: Saveabend: SRLs Used: 1995-08-11 14:27:01.00 DEBUG 0 0 WORDS OFF OFF OFF OFF ZCRTLSRL ZCRESRL Library Object File: \FOLK.$SYSTEM.SYS01.
INFO OPENS High-Level Inspect Commands INFO OPENS [ { * | file-list } [ DETAIL ] [ file-type ] ] file-list file-number file-type: [, file-number ]... one of FORTRAN FD GUARDIAN * requests the status of all files opened by the current program. file-list requests the status of specific files. file-list is a list of file numbers identifying the desired files. file-number specifies a single file.
Default Values High-Level Inspect Commands FD indicates that file-number values specify OSS file descriptors. Files without OSS file descriptors will not be displayed. GUARDIAN indicates that file-number values specify Guardian system file numbers. Files without Guardian file system numbers will not be displayed. Default Values The default file type is Guardian file system numbers.
Usage Considerations High-Level Inspect Commands DETAIL Field Name Field Description (page 2 of 2) SEXT SIZE Secondary extent size. EOF Relative byte address of the end-of-file location. LAST MODIFIED Time the file was last modified. For more information, see the description of FILEINFO in Guardian Procedure Calls Reference Manual.
Output High-Level Inspect Commands Output The DETAIL clause of the INFO OPENS command produces output of this form for OSS file descriptors. Descriptor: integer Number: integer Name: pathname OSS File Information File Type: Last Error: Close on Exec: file-type integer ON | OFF OSS Disk File Information Serial Number: Device ID: RDev: Link Count: UID: GID: End of file: Access Timestamp: Change Timestamp: double double double integer uid gid double timestamp timestamp Note.
Examples High-Level Inspect Commands 2. For FORTRAN programs where logical units have been defined, the F clause lists information for all defined logical units. Logical units followed by “Not Assigned” have not been assigned a Guardian file number. -I001OBF0-INFO OPEN * f Logical File Last Unit Number Filename Error 0 Not Assigned 1 1 \CUBS.$BOB.QAT9252I.NEW 0 2 2 \CUBS.$BOB.QAT9252I.NEW 0 3 Not Assigned 4 \CUBS.$ZTNT.#PTY23 5 \CUBS.$ZTNT.#PTY23 6 \CUBS.$ZTNT.#PTY23 7 Not Assigned 8 Not Assigned 9 \CUBS.
INFO SAVEFILE High-Level Inspect Commands 5. Using the previous example, the following output illustrates what the INFO OPENS command displays when the FD clause is used. Only files that have an OSS file descriptor associated with them are displayed. -test4-INFO OPENS * File File Descriptor Number 0 4 1 5 2 6 3 1 FD Filename /G/ztnt/#pty0025 /G/ztnt/#pty0025 /G/ztnt/#pty0025 /usr/morris/test1.
Output High-Level Inspect Commands Output The INFO SAVEFILE command produces output of this form: Save File: savefile name [ [ [ Cause: Creator: Creation Timestamp: Creator's User ID: Guardian Version: Trap Number: Signal Number: Wait Status: Processor: Program File: Program Binder Timestamp: Program Modification Timestamp: System: Truncated File Info: Truncated Segment Info: [ [ [ [ Library Information Library File: filename Library Binder Timestamp: timestamp Library Modification Timestamp: timestam
Example High-Level Inspect Commands be displayed if the process terminated due to a trap (or signal if a native process), and items marked with “*2” are for OSS processes only. Example An example of information the INFO SAVEFILE command produces is: -DEMO-INFO SAVEFILE Save File: \FOLK.$LORE.HELP.DEMOS Cause: COMMAND Creator: INSPECT Creation Timestamp: 1995-11-12 22:46:58.269.416 Creator's User ID: SUPER.SUPER (255,255) Guardian 90 Version: D40 Processor: TNS/R (NSR-L) Program File: \FOLK.$LORE.EXAMPLE.
Default Value High-Level Inspect Commands INFO SCOPE [ scope-spec ] scope-spec: one of scope-number scope-path #data-block ##GLOBAL scope-spec specifies the scope unit you want. scope-number specifies a scope unit by its scope number as displayed by the TRACE command. scope-path specifies a scope unit by name. INFO SCOPE displays information about the last scope unit specified in the scope path. #data-block specifies a named data block as the scope unit.
Output High-Level Inspect Commands Output The INFO SCOPE command produces output of this form: Scope Name: name Source File: file Modification timestamp: timestamp Compilation timestamp: timestamp Language: lang Type: CODE Base: integer Entry: integer Length: integer words [Optimization level: integer] *1 Items labelled with “*1” are only present for native code scopes. Examples 1.
INFO SEGMENTS High-Level Inspect Commands 3. This example illustrates the information presented by the INFO SCOPE command for a TNS/R native program at optimization level zero. -DEMO-INFO SCOPE Scope Name: main Source file: \FOLK.$LORE.EXAMPLE.DEMO Compilation timestamp: 1995-08-11 14:19:18.000.000 Language: C Type: CODE Base: 939524552 Entry: 939524552 Length: 40 words Optimization Level: 0 4.
Default Value High-Level Inspect Commands Default Value If you enter INFO SEGMENTS alone, Inspect displays information on segments the process has allocated.
Example High-Level Inspect Commands This template shows the information displayed using the DETAIL clause. Segment ID: nnnn (text description) Base: Current Length: Description: [ Flags: Limit: [ Swap File: Type: double double text [ [EXTENSIBLE] [RESIDENT] [READONLY] [SHARED] ] double filename ] DATA | CODE Example This example shows the information that INFO SEGMENTS presents.
Default Value High-Level Inspect Commands SIGTSTP SIGABEND SIGMEMMGR SIGTIMEOUT SIGTTIN SIGLIMIT SIGNOMEM SIGTTOU SIGSTK SIGMEMERR Default Value If you enter INFO SIGNALS alone, Inspect displays information on all the signals of the current program. Output This output illustrates the information displayed using the DETAIL clause. Signal: signal-id Handler: SIG_DFL | SIG_IGN | SIG_DEBUG | #function-name Mask: NONE | signal-id [, signal-id ...
Default Values High-Level Inspect Commands key-name specifies the function key for which you want to provide or display a definition. Valid function keys include F1 through F16 and shifted F1 (SF1) through shifted F16 (SF16). replacement string specifies the replacement string to associate with the given function key. The replacement string is a group of zero or more characters enclosed in either quotes (") or apostrophes (').
Usage Consideration High-Level Inspect Commands ALIAS[ES] [ alias-name ] [ AS COMMAND[S] ] BREAKPOINT[S] [ breakpoint-number | * ] [ options ] HISTORY [ command-range ] [ AS COMMAND[S] ] KEY[S] [ key-name ] [ AS COMMAND[S] ] PROGRAM[S] [ program | * ] [ [ , ] DETAIL ] SOURCE ASSIGN[S] [ AS COMMAND[S] ] SOURCE OPEN[S] options: one of [ [ , ] key-name: F1 F9 SF1 SF9 program: DETAIL ] | [ AS COMMAND[S] ] one of F2 F10 SF2 SF10 F3 F11 SF3 SF11 F4 F12 SF4 SF12 F5 F13 SF5 SF13 F6 F14 SF6 SF14 F7 F15 SF
LIST ALIAS High-Level Inspect Commands LIST ALIAS The LIST ALIAS command displays either one or all aliases from the alias list for the current Inspect session. LIST ALIAS[ES] [ alias-name ] [ AS COMMAND[S] ] alias-name specifies the name of a previously defined alias. AS COMMAND[S] directs LIST ALIAS to display each alias definition as an ADD ALIAS command. Default Value If you do not specify an alias name, LIST ALIAS displays all alias definitions.
Default Values High-Level Inspect Commands * lists all breakpoints. AS COMMAND[S] directs LIST BREAKPOINT to display the breakpoint definition as a BREAK command. Default Values If no breakpoint number is specified, LIST BREAKPOINT displays all breakpoints defined in the current program. The asterisk (*) lists information for all breakpoints. Usage Considerations Data, low-level, or Debug breakpoints cannot be used in conjunction with AS COMMANDS. AS COMMANDS cannot be used with DETAIL.
Output High-Level Inspect Commands Output The DETAIL clause results in the following output format: Breakpoint Number: number Debugger: EVERY: IF: Input text: Location: Option: TEMP: THEN: Type: Subtype: [ [ [ [ [ [ [ Debug | Inspect Every-limit [ (every-count) ]] condition ] command line following BREAK ] location options | None ] temp-remaining ] THEN action ] Code | Data | ABEND | STOP R/W | Write | Change (1) (2) (3) (4) (5) (6) ] (7) The notes indicate: (1) Listed only for Inspect breakpoints wit
Examples High-Level Inspect Commands 2. This illustrates the default output of the LIST BREAKPOINT command. Note that data breakpoints have a subtype, which is one of: Change, Write, or R/W (Read/Write): -PROGSC-LIST BREAKPOINT Num Type Subtype Location 1 Code #ER^FATAL.#590 2 Code #ST^UNIT^HEADER.#4980 IF UNIT^OFFSET = 523222 THEN " t 1 arg" 3 Data Change Byte Address %1562 "CURRENT^PROGRAM^N" 4 Code #VA^BUILD^ADDRESS.#2012 EVERY 5 3.
LIST HISTORY High-Level Inspect Commands Breakpoint Number: 4 Debugger: EVERY: Input text: Location: Type: INSPECT 5 #VA^BUILD^ADDRESS EVERY 5 #VA^BUILD^ADDRESS.#2012 Code 6. This illustrates that Inspect always shows the breakpoint conditions first, followed by the breakpoint actions. For the two breakpoint conditions, EVERY and IF, EVERY is always shown first. For the breakpoint actions, THEN and TEMP, THEN is always shown first.
Default Value High-Level Inspect Commands search-text is the most recent command line in the history buffer that begins with the text you specify. You need to specify only as many characters as necessary to identify the command line uniquely. AS COMMAND[S] directs LIST HISTORY to display the command lines as executable Inspect commands. Default Value If you do not specify a command range, LIST HISTORY displays the entire history buffer.
Default Value High-Level Inspect Commands Default Value If you do not specify a function key, LIST KEY displays all function-key definitions. Related Commands ADD KEY on page 6-9 DELETE KEY on page 6-30 FK on page 6-90 KEY on page 6-128 LIST PROGRAM The LIST PROGRAM command displays the list of programs being debugged.
Related Commands High-Level Inspect Commands If no program is specified, or “*” is specified, information is listed about all programs on the program list.
Examples High-Level Inspect Commands The instruction set will be listed as TNS/E for an OCA-accelerated program on a TNS/E system. Location strings and program names that would extend beyond the last column are broken at the last column and listed in the next line beginning at the starting column of the Location field, or the Program Name field respectively. Examples 1. This example shows the LIST PROGRAM command without the DETAIL clause.
Examples High-Level Inspect Commands 3. This example shows for a savefile of a TNS/R native program. -DEMO-LIST PROGRAM 1, DETAIL Name: DEMO Number: 1 General Information Accelerated: CPU,PIN: GUARDIAN Version: Instruction Set: Location: Processor: Program: Library: Library: Library: Library: Library: State: System: Type: NO 2,33 D40 TNS/R #main.#5.301(SDEMO) TNS/R (NSR-L) \FOLK.$LORE.EXAMPLE.DEMO \FOLK.$SYSTEM.SYS01.ZCRESRL \FOLK.$SYSTEM.SYS01.ZCRTLSRL \FOLK.$SYSTEM.SYS01.ZOSSKSRL \FOLK.$SYSTEM.SYS01.
LIST SOURCE ASSIGN High-Level Inspect Commands 5. This example shows the DETAIL listing for an accelerated TNS object file on a TNS/E system. In this example, the program shown in the previous example has been processed by the TNS Object Code Accelerator (OCA). -CCLE-LIST PROGRAM CCLE DETAIL Name: CCLE Number: 1 General Information Accelerated: Accelerated State: CPU,PIN: GUARDIAN Version: Instruction Set: Location: Processor: Program: State: System: Type: YES Register-exact 5,7 H06 TNS/E #CCL.
LIST SOURCE OPEN High-Level Inspect Commands LIST SOURCE OPEN The LIST SOURCE OPEN command displays the names of the files that are currently open as a result of previous SOURCE commands. LIST SOURCE OPEN[S] Related Commands DELETE SOURCE OPEN on page 6-32 SOURCE on page 6-196 SOURCE OPEN on page 6-208 LOG The LOG command records the session input, output, or both input and output in a permanent file.
Related Commands High-Level Inspect Commands The current log file is closed and all logging is stopped when the LOG STOP command is entered or the current Inspect session is terminated. Inspect qualifies the log file using the current volume and subvolume if Inspect’s systype is Guardian, otherwise, Inspect will qualify the file name using the current OSS directory.
Related Commands High-Level Inspect Commands Low-level Inspect is not supported for native programs. Use the SELECT DEBUGGER DEBUG command for TNS/R machine-level debugging. Related Commands HIGH (low-level command) SELECT DEBUGGER DEBUG on page 6-165 MATCH The MATCH command searches for scope-unit names or other identifiers in the current program.
Default Values High-Level Inspect Commands Default Values If the MATCH IDENTIFIER command is entered with only one pattern, Inspect will display only the matching symbols, and the scopes they were found in. If the VERBOSE clause is omitted, scope names are displayed only if they have a matching pattern. Usage Considerations Matching Uppercase and Lowercase Letters The MATCH command does not distinguish between uppercase and lowercase letters in the pattern unless the current language is C.
MODIFY High-Level Inspect Commands 2. This example searches for identifiers that contain the characters ERR: -TALOBJ-MATCH IDENTIFIER *err*, VERBOSE Searching ER^REPORT^ERROR ERROR^NUMBER Searching FLAGS^DATA^BLOCK OVERRIDE^FLAG Searching #GLOBAL FILE^ERR NEWPROCESS^ERROR SPOOLER^ERROR 3. This example illustrates the VERBOSE clause of the MATCH IDENTIFIER command.
MODIFY High-Level Inspect Commands register-name: one of tns-register-name tns/r-register-name tns-register-name: P R0 RA E R1 RB L R2 RC S R3 RD one of R4 RE R5 RF R6 RG R7 RH one of tns/r-register-name: $PC $H1 $LO $0 tns/r-register-alias tns/r-register-alias: $AT $S0 $T0 $K0 $V0 $S1 $T1 $K1 signal-id: $V1 $S2 $T2 $GP $1...
MODIFY High-Level Inspect Commands data-location [ WHOLE ] [ { = | := } mod-list ] modifies the data item specified by data-location. This data item must describe an area large enough to hold all values specified by mod-list. In addition, the data item cannot be a read-only array. WHOLE causes Inspect to treat the data item as a string of contiguous characters if it is a group item (a record or structure, for example). The WHOLE clause is invalid for PATHWAY requester programs.
Default Value High-Level Inspect Commands Default Value If you do not supply a new value for the data item, register or signal, Inspect prompts you for it. Usage Considerations Using the := and = Assignment Operators There is no difference between the two forms of the assignment operator. Either := or = can be used.
Usage Considerations for Accelerated Programs High-Level Inspect Commands Modifying FILLER Elements of a Record Using the WHOLE clause enables you to assign values to all elements of a record, including those designated FILLER. Interactive MODIFY in a Command List If you include an interactive MODIFY command (one where Inspect needs to prompt you for values) in a command list, it must be the last command in the command list.
Examples High-Level Inspect Commands Before making modifications, display B field-by-field and then as a single string: -COBOLOBJ-DISPLAY B B = C = "Jelvo, B. " D = 45 E = 4085551212. F = "Alvin's Place " -COBOLOBJ-DISPLAY B WHOLE B = "Jelvo, B. " ?0 "-4085551212Alvin's Place " Change the C field and then DISPLAY to verify the change: -COBOLOBJ-MODIFY C OF B = "Manley, G." -COBOLOBJ-DISPLAY B B = C = "Manley, G." D = 45 E = 4085551212.
OBEY High-Level Inspect Commands INTEGER K(10,10) INTEGER ARR (12) -FORTOBJ-MODIFY A=5 -FORTOBJ-MODIFY S="Falcon" -FORTOBJ-MODIFY K(1:5,3) := 4,7,9,15,22 -FORTOBJ-MODIFY K(1:5,4) := 5 COPIES 0 -FORTOBJ-DISPLAY A, S, K(1:5, 3:4) A = 5, S = "Falcon" K[1,3] = 4 7 9 15 22 K[1,4] = 0 0 0 0 0 Use Inspect to prompt for new values: -FORTOBJ-MODIFY ARR(6:11) ARR(6)=49 := , ARR(7)=50 := 37 ARR(8)=51 := The comma above leaves ARR(6) unchanged, and pressing carriage return aborts the Inspect prompting, leaving ARR(
Related Commands High-Level Inspect Commands breakpoint is activated, Inspect opens and reads commands from the OBEY file. When Inspect encounters the RESUME command in the OBEY file, it lets the program resume execution but does not close the OBEY file. The next time the breakpoint is activated, Inspect will again try to open the OBEY file. However, the OBEY file is still open as a result of the first breakpoint activation.
OPENS High-Level Inspect Commands OPENS [ { * | file-list } [ DETAIL ] [ file-type ] ] file-list: file-number file-type: [ , file-number ]... one of FORTRAN FD GUARDIAN * requests the status of all files opened by the current program. file-list requests the status of specific files. file-list is a list of file numbers identifying the desired files. file-number specifies a single file.
Default Values High-Level Inspect Commands GUARDIAN indicates that file-number values specify Guardian system file numbers. Files without Guardian file system numbers will not be displayed. Default Values The default file type is Guardian file system numbers. If you enter the OPENS command without parameters, Inspect displays the status of all files opened by the current program. OUT The OUT command directs the output listing to a specified file.
PAUSE High-Level Inspect Commands TERM on page 6-218 VOLUME on page 6-223 PAUSE The PAUSE command suppresses Inspect prompts until a debug event occurs in any of the programs on the program list. PAUSE Usage Considerations Inspect begins prompting after a PAUSE when: You press the BREAK key, assuming that the program has not taken control of the BREAK key. Any running program under the control of Inspect generates a debug event.
Default Value High-Level Inspect Commands program-name identifies a program by its program name (as shown by the LIST PROGRAM command). cpu,pin identifies a process by its process ID (CPU number and process number). CODE code-file directs Inspect to retrieve symbol information from an object code file different from the one used to create the process (or the process that was saved).
RESUME High-Level Inspect Commands RESUME The RESUME command reactivates a suspended program, changing the program’s state from hold to run. The RESUME command is not valid for save files. RESUME [ * [ EXIT ] ] [ program ] [ AT code-location [ , RP integer ] ] program: one of program-number program-name cpu,pin PATHWAY-terminal-name * [ EXIT ] resumes all executable programs currently in the hold state.
Usage Considerations High-Level Inspect Commands Usage Considerations RESUME in Command Lists In a command list, RESUME must be the last command. RESUME in OBEY Files If you use RESUME in an OBEY file and then refer to that OBEY file in the THEN clause of the BREAK command, Inspect reports an error. For more information, see the description of the OBEY on page 6-152.
Related Commands High-Level Inspect Commands value usually corresponds to the return value size at return points, and is 7 at other register-exact points. Related Commands HOLD on page 6-93 STEP on page 6-212 STOP on page 6-215 SAVE The SAVE command creates a save file of the current program. A save file is a “snapshot” or “image” of a process or PATHWAY server stored on disk.
Usage Considerations High-Level Inspect Commands Usage Considerations All save files created by Inspect are of type unstructured and have a file code ofþ130. Inspect qualifies filename using the current subvolume if systype is Guardian or the current working directory if systype is OSS. If you have not set the volume and subvolume explicitly, they are the default volume and subvolume of the Inspect session. Use the ENV command to determine these defaults.
SCOPE High-Level Inspect Commands SCOPE The SCOPE command changes or displays the current scope path. For more information about scopes, see Scope Paths on page 2-12. SCOPE [ scope-spec ] scope-spec: one of scope-number scope-path [ (instance) ] #data-block ##GLOBAL scope-spec specifies the scope path that Inspect is to use as the current scope path when qualifying unqualified identifiers.
Usage Considerations High-Level Inspect Commands Usage Considerations To examine an element as it exists during a particular instance, include an instance number when you specify the scope path. You can count from either direction using these conventions: Instance 1 is the least recent instance—that is, the oldest chronologically. Positive values count from the base of the stack toward the top. Instance 0 is the most recent instance—that is, the current scope path.
SELECT High-Level Inspect Commands SELECT This diagram shows the complete syntax for the SELECT command and its clauses. Detailed descriptions of the clauses, including usage considerations and examples, are presented in the following subsections. SELECT select-option select-option: one of DEBUGGER DEBUG LANGUAGE language PROGRAM program [ CODE file-name ] [ LIB file-name ] [ SRL {(srl-file [ , srl-file,...
SELECT DEBUGGER DEBUG High-Level Inspect Commands SELECT DEBUGGER DEBUG The SELECT DEBUGGER DEBUG command allows you to invoke an alternate debugger: On a TNS/R system, Debug is the alternate debugger for TNS or TNS/R programs. You interact with Debug until issuing the Debug command “INSPECT”, which returns control of the program to Inspect. On a TNS/E system, Native Inspect is the alternate debugger for TNS/E native programs (Native Inspect replaces Debug as the system debugger on TNS/E systems).
Usage Considerations for Privileged Users High-Level Inspect Commands In some debugging situations, the differences between Inspect and Debug may be important. Inspect runs as an application process while Debug actually runs as part of the process being debugged. As a result, Inspect may affect the state of the system more than Debug. Debug, on the other hand, makes use of the program's stack, which can affect program behavior.
Usage Considerations High-Level Inspect Commands switch between language-dependent syntaxes; therefore, you can avoid incompatibilities between languages. The difference between the use of the caret (^) in TAL and Pascal is an example of a language incompatibility. SELECT LANGUAGE language one of language: C FORTRAN C++ Pascal COBOL SCOBOL COBOL85 TAL language specifies which source language Inspect should make current.
Usage Consideration High-Level Inspect Commands program specifies a program using one of several formats. program-number identifies a program by its program number (as shown by the LIST PROGRAM command). program-name identifies a program by its program name (as shown by the LIST PROGRAM command). cpu,pin identifies a process by its process ID (CPU number and process number).
SELECT SEGMENT High-Level Inspect Commands SELECT SEGMENT The SELECT SEGMENT command selects extended data segments in which extended data addresses are to be resolved. In effect, this controls the extended data segment viewed by Inspect. SELECT SEGMENT[S] [ segment-id ] segment-id is the ID of an extended segment. Any selectable segment ID listed by the INFO SEGMENTS command is valid.
Usage Considerations High-Level Inspect Commands Usage Considerations Inspect provides the SELECT SOURCE SYSTEM command for one common context in particular: when a program's object code is copied to another system, but its source code is not. SELECT SOURCE SYSTEM sets the source system for the current program. Each program that you are debugging can have its own source system.
SET High-Level Inspect Commands SET The SET command controls Inspect parameters that enable you to customize your Inspect session. This is the complete syntax for the SET command and its clauses. Detailed descriptions of the clauses, including usage considerations and examples, are presented in the following subsections.
SET CHARACTER FORMAT High-Level Inspect Commands prompt-item: one of string DIRECTORY LEVEL PROGRAM FILE PROGRAM PID STEP SYSTYPE radix: ACCELERATOR STATE ICODE FN PROGRAM NAME RADIX SUBVOL[UME] VOLUME COMMAND INSTRUCTION SET PROCESSOR PROGRAM ORDINAL SOURCE SYSTEM one of DEC[IMAL] HEX[ADECIMAL] OCT[AL] count: integer [ STATEMENT[S] | LINE[S] | INSTRUCTION[S] ] range: F one of L #line-number statement-number status-item-list: status-item [ , status-item ]...
Default Value High-Level Inspect Commands ASCII displays items as printable 7-bit ASCII characters. If a byte value is not 7-bit ASCII (32-127), it is shown as ?nnn, in the current output radix. XASCII displays items as printable 8-bit extended ASCII characters. If a byte value is not 8-bit ASCII (32-255), it is shown as ?nnn, in the current output radix. GRAPHICS displays items as characters, including control characters.
Related Commands High-Level Inspect Commands Related Commands DISPLAY on page 6-33 SHOW command with DEREFERENCE DEPTH option on page 6-194 SET ECHO The SET ECHO command controls whether Inspect redisplays, or echoes, command lines when you use an alias, a function key, or the XC command. SET ECHO echo-item [=] { ON | OFF } echo-item: one of ALIAS[ES] HISTORY KEY[S] echo-item specifies which echo control you want to set. ALIAS controls echoing of command lines containing aliases.
Default Value High-Level Inspect Commands Default Value By default, Inspect looks for a file named INSPHELP in the same subvolume as the Inspect object file. Typically, the Inspect object file is located in the SYSnn subvolume. Related Command SHOW with HELP FILE option SET LOCATION FORMAT The SET LOCATION FORMAT command controls how Inspect displays code locations. In addition, the SET LOCATION FORMAT command allows you to differentiate between statement numbers and labels within FORTRAN programs.
Default Value High-Level Inspect Commands LINE[S] [ FILE [ ALL ] ] [ OFFSET ] directs Inspect to display the scope path for a code location followed by the EDIT line number corresponding to the location: scope-path.#line-number The FILE clause directs Inspect to add the eight-character name of the source file; ALL directs Inspect to use the fully qualified file name: scope-path.
Usage Considerations High-Level Inspect Commands Usage Considerations When Inspect Uses the Location Format Inspect uses the location format whenever it displays a code location.
SET PROMPT High-Level Inspect Commands SET PROMPT The SET PROMPT command controls the format of the Inspect prompt. SET PROMPT [=] [ prompt-item [ , prompt-item ]... ] prompt-item: one of string DIRECTORY INSTRUCTION SET PROGRAM FILE PROGRAM PID STEP SYSTYPE ACCELERATOR STATE FN LEVEL PROGRAM NAME RADIX SUBVOL[UME] VOLUME COMMAND ICODE PROCESSOR PROGRAM ORDINAL SOURCE SYSTEM one of string: " [ character ]... " ' [ character ]... ' prompt-item [ , prompt-item ]...
SET PROMPT High-Level Inspect Commands DIRECTORY directs Inspect to display the current OSS directory. Directory remains blank if there is no current OSS directory. FN directs Inspect to display “(FN)”. You can continue the previous low-level FN (Find Number) command by pressing RETURN. ICODE directs Inspect to display “(ICODE)”. You can continue the previous ICODE command by pressing RETURN.
Default Value High-Level Inspect Commands PROGRAM PID directs Inspect to display the current program’s process ID in the form sys,cpu,pin. RADIX directs Inspect to display the current input radix: DEC, HEX, or OCTAL. SOURCE directs Inspect to display “(SOURCE)” if you can continue the previous SOURCE command by pressing RETURN. STEP directs Inspect to display “(STEP count unit)” if you can repeat the previous STEP command by pressing RETURN.
Related Commands High-Level Inspect Commands Related Commands LIST PROGRAM on page 6-137 SET STATUS LINE25 and SET STATUS SCROLL on page 6-187 SHOW with PROMPT option on page 6-194 SET RADIX The SET RADIX command changes the default radix (numeric base) for integer representations of input, output, or both. Inspect uses the default input radix to qualify integer values that are unqualified—that is, integers whose base is not specified.
Default Values High-Level Inspect Commands Default Values If you specify neither INPUT nor OUTPUT, Inspect sets both the input and output radixes to radix. If you omit level, SET RADIX affects the current command mode.
SET SOURCE BACK and SET SOURCE FOR High-Level Inspect Commands Set GABRIEL to a binary value and display: -TALOBJ-MODIFY gabriel = %b00110100; DISPLAY gabriel GABRIEL = %64 Show GABRIEL in a new default radix: -TALOBJ-SET RADIX = DECIMAL; DISPLAY gabriel GABRIEL = 52 Modify it to show that the default input radix is 10: -TALOBJ-MODIFY gabriel = 12; DISPLAY gabriel GABRIEL = 12 Set the input radix to octal, and leave the output radix at decimal: -TALOBJ-SET RADIX INPUT = OCTAL; DISPLAY gabriel GABRIEL =
Default Value High-Level Inspect Commands Default Value The default INSPLOCL file sets SOURCE BACK and SOURCE FOR as follows: SET SOURCE BACK = 4 LINES SET SOURCE FOR = 10 LINES Related Commands SET SOURCERANGE on page 6-184 SELECT SOURCE SYSTEM on page 6-169 SHOW with SOURCE BACK option on page 6-194 SHOW with SOURCE FOR option on page 6-194 SOURCE on page 6-196 SET SOURCERANGE The SET SOURCE RANGE command controls the default range used by the SOURCE SEARCH command.
Default Value High-Level Inspect Commands Default Value The default INSPLOCL file sets SOURCE RANGE as follows: SET SOURCE RANGE = F / L Related Commands SELECT SOURCE SYSTEM on page 6-169 SET SOURCE BACK and SET SOURCE FOR on page 6-183 SHOW with SOURCE RANGE option on page 6-194 SOURCE on page 6-196 SET SOURCE WRAP The SET SOURCEþWRAP command controls whether the SOURCE command truncates or wraps long source lines by default.
SET STATUS ACTION High-Level Inspect Commands SET STATUS ACTION The SET STATUS ACTION command specifies actions that Inspect is to perform after it displays the event status message. SET STATUS ACTION [ level ] [=] [ cmd-string ] level: one of BOTH HIGH cmd-string: LOW one of " command [ ; command ]... " ' command [ ; command ]... ' level specifies the command-mode level whose status action you want to set.
Related Commands High-Level Inspect Commands Related Commands SET STATUS LINE25 and SET STATUS SCROLL on page 6-187 SHOW with STATUS ACTION option on page 6-194 SET STATUS LINE25 and SET STATUS SCROLL The SET STATUS LINE25 and SET STATUS SCROLL commands control the information Inspect displays in the event-status message.
SET STATUS LINE25 and SET STATUS SCROLL High-Level Inspect Commands status-item [ , status-item ]... is a list of status items that defines the lineþ25 or scrolling content of the Inspect event status message. Inspect displays the status items in the order that they appear in the list. OUT filename allows you to specify what out file you want data to go to when an event occurs. string directs Inspect to display a string of text.
High-Level Inspect Commands SET STATUS LINE25 and SET STATUS SCROLL LANGUAGE directs Inspect to display the current language. LOCATION directs Inspect to display the location at which the event occurred. Inspect uses the format specified by SET LOCATION FORMAT to display the location. NEW LINE directs Inspect to go to the next screen line. Inspect ignores NEW LINE for SET STATUS LINE25. PROCESSOR directs Inspect to display the machine family name and processor name the current program is executing on.
Default Values High-Level Inspect Commands PROGRAM PID directs Inspect to display the current program’s process ID in the form sys,cpu,pin. SCOPE directs Inspect to display the current scope path. STATE directs Inspect to display the current program's execution state: RUN, HOLD, STOP or GONE. For more information about execution states, see Section 2, Inspect Concepts. SYSTYPE directs Inspect to display the current systype, either Guardian or OSS.
Related Commands High-Level Inspect Commands Maximum Length of the Line 25 Status Message The line 25 status message accommodates up to 64 characters. If the list of status items you specify results in a longer status message, Inspect truncates it to 64 characters. Maximum Amount Written in the Event-Status Message The maximum amount that is written out in the event-status message is determined by the record length of the device being written to.
Related Commands High-Level Inspect Commands Related Commands DISPLAY on page 6-33 SHOW with SUBPROC SCOPING option on page 6-194 Example This example illustrates the SET SUBPROC SCOPING command. Note that the current location is within subprocedure “s”.
SET TRACE High-Level Inspect Commands SET TRACE The SET TRACE command controls the dynamic trace facility of Inspect. When dynamic tracing is activated, Inspect displays trace information concerning the current program as it executes. SET TRACE enables you to activate this facility and control the level of tracing. Note. The SET TRACE command is invalid for Pathway requester programs.
Usage Considerations High-Level Inspect Commands Usage Considerations The SET TRACE command is ignored when the STEP command is used. SCOPE TRACE and ARGUMENT TRACE information is not reported when a breakpoint is hit.
Related Commands High-Level Inspect Commands create a command file. You can then incorporate this file in an OBEY file or the INSPLOCL or INSPCSTM customization files; for example: -PRG-SHOW /OUT mysets/ ALL AS COMMANDS Related Commands ENV on page 6-81 LIST on page 6-129 SET on page 6-171 SIGNALS The SIGNALS command displays signal information for the current program; it does not support Guardian processes. The SIGNALS command is an alias for the INFO SIGNALS command.
SOURCE High-Level Inspect Commands SOURCE The SOURCE command's primary function is to display source text. It performs other functions, including searching for source text, displaying text from an arbitrary file, and allowing you to redefine the location of source files. SOURCE [ source-locator ] [ limit-spec ]...
SOURCE High-Level Inspect Commands ICODE [ AT code-location ] specifies instruction-code presentation of the source text corresponding to the code location given in the AT clause. LINE #line-number specifies the source text corresponding to the given line number. Inspect uses the current scope path to qualify this line number unless you specify filelocator. [ STATEMENT ] statement-number specifies the source text corresponding to the given statement number.
Default Values High-Level Inspect Commands file-locator directs Inspect to read from a file other than the one containing the source text for the current scope path. In this context, the SOURCE command is used to browse through edit files. Inspect does not annotate the source with information such as statement numbers, memory-exact points or the current location. The filelocator clause accepts both Guardian filenames and OSS pathnames, depending on the current systype of Inspect.
Usage Considerations High-Level Inspect Commands If you do not specify file-locator, the SOURCE command reads from the file associated with source-locator. If you do not specify WRAP, the SOURCE command uses the current value of the SOURCE WRAP environment parameter. You can use the SET command to change this parameter. Usage Considerations Components of the Source Display When you use the SOURCE command, Inspect displays the source text corresponding to the location you provide.
Usage Considerations High-Level Inspect Commands Inspect issues this warning once when it first opens the file; subsequent accesses to the file do not produce the warning. Modifying a source file after it was compiled will result in a timestamp mismatch. In this case, the correspondence between code locations and source lines might be invalid.
Usage Consideration for Accelerated Programs on TNS/R Systems High-Level Inspect Commands Usage Consideration for Accelerated Programs on TNS/R Systems When debugging accelerated programs, the SOURCE command annotates the listed statements to mark statements that are register-exact points with a “@” and those that have been “Deleted” (that is, are not memory-exact points) with a “–”. Note.
Examples High-Level Inspect Commands Examples 1. When the LOCATION FORMAT is set to STATEMENTS, the SOURCE command does not list statement numbers for statements deleted by TNS optimizations. In this example, the statement number 15 is not listed because it was deleted by optimizations. 12 13 14 16 z := x; z := y; GOTO bar; GOTO foo; z := 1; 2.
Default Values High-Level Inspect Commands determine what file to retrieve source text from. If a source file has been moved since a program was compiled, Inspect will be unable to locate source text to display. The SOURCE ASSIGN command enables you to inform Inspect where to find source files when their location has changed. SOURCE ASSIGN[S] original-name: [ [ original-name, ] new-name ] one of [ \system. ] $volume [ .subvolume [ .file ] ] [ \system. ] $process [ .#qual-1 [ .qual-2 ] ] [ \system.
Related Commands High-Level Inspect Commands Related Commands ADD SOURCE ASSIGN on page 6-14 DELETE SOURCE ASSIGN on page 6-31 LIST SOURCE ASSIGN on page 6-141 SELECT SOURCE SYSTEM on page 6-169 SOURCE on page 6-196 SOURCE SYSTEM on page 6-211 SOURCE ICODE The SOURCE ICODE command lists the instruction mnemonics corresponding to listed source text.
Default Value High-Level Inspect Commands WRAP directs Inspect to display the full length of each source line, wrapping it onto the next line if necessary. Default Value The SOURCE ICODE command lists the same range of lines as listed by the SOURCE command. Usage Considerations When displaying source and instruction mnemonics, Inspect lists source lines until the beginning of a statement/verb is encountered, at which point instructions for the preceding statement/verb are listed.
Related Command High-Level Inspect Commands Related Command ICODE Example 1. This example illustrates the SOURCE ICODE command. -PROGRAM-SOURCE ICODE AT #open^file FOR 7 statements #398 INT PROC open^file( fcb, fname^int ); ADDS +013 LADR L+020 LLS 01 PUSH 700 ADDS +025 #399 STRING .EXT fcb; #400 INT .fname^int; #401 BEGIN #402 STRING buf[ 0:10 ]; #403 INT dtype; #404 INT error; #405 INT error^subcode; #406 INT file^code; #407 INT fn; #408 STRING .
SOURCE OFF High-Level Inspect Commands 2. This example illustrates the SOURCE ICODE command listing TNS/R native programs. -PROGRAM-SOURCE ICODE FOR 3 STATEMENTS *#10.000 Proc P( u, v, w, x, y); 10.000 10.000 10.000 #11.000 #12.000 #13.000 #14.000 #15.000 #16.000 #17.000 + - addiu sw sw int(32) int(32) int(32) int(32) int(32) Begin m := u + 17.000 17.000 10.000 17.000 10.000 17.000 17.000 18.000 17.000 10.000 17.000 17.000 #18.000 18.000 18.000 18.000 18.000 18.000 18.
SOURCE ON High-Level Inspect Commands SOURCE ON The SOURCE ON command enables automatic source display at each event. SOURCE ON is equivalent to the command SET STATUS ACTION HIGH = “SOURCE FOR 1”. SOURCE ON Related Commands SET STATUS ACTION on page 6-186 SOURCE OFF on page 6-207 SOURCE OPEN The SOURCE OPEN command displays the names of the files currently open as a result of previous SOURCE commands. The SOURCE OPEN command is a synonym for the LIST SOURCE OPEN command.
Usage Consideration High-Level Inspect Commands string is a string of characters enclosed in quotes. To include a quote in the string, use a pair of quotes. CASE directs Inspect to distinguish between uppercase and lowercase letters as it searches. If you omit CASE, Inspect does not differentiate uppercase from lowercase. position / position specifies the range of lines to search. The first position denotes the start of the range, and the second position denotes the end of the range.
Examples High-Level Inspect Commands Examples This examples for the SOURCE SEARCH command are based on the source code. LOCATION FORMAT has been set to LINES, STATEMENTS to display both edit line and statement numbers. -PROGRAM-SOURCE FOR 5 STATEMENTS *3 #25 val3 = 0x7DF4; 4 #26 val1 = 0; #27 #28 5 #29 owner_id = (int) val3 >> 16; 6 #30 val2 = proc2(val1, owner_id); #31 #32 /* test should match first compare. */ 7 #33 if ( val2 == 0 ) 1.
SOURCE SYSTEM High-Level Inspect Commands 4. This example illustrates backward searching. -PROGRAM-SOURCE #30 -PROGRAM#29 -PROGRAM#20 -PROGRAM-SOURCE #30 -PROGRAM#29 -PROGRAM#20 SEARCH 'owner_id' #34/#20 val2 = proc2(val1, owner_id); owner_id = (int) val3 >> 16; int owner_id = 0; SEARCH 'owner_id' #34/F val2 = proc2(val1, owner_id); owner_id = (int) val3 >> 16; int owner_id = 0; 5. This example illustrates the use of FILE as the file-locator to search for source from an arbitrary file.
Default Value High-Level Inspect Commands system specifies the system from which Inspect should retrieve source files. Default Value If you do not specify a system name in a SOURCE SYSTEM command, Inspect uses the name of your current system.
Default Value High-Level Inspect Commands IN [ num-units [ code-unit ] ] specifies the step amount as a number of code units. The IN clause directs STEP to step into a called scope unit if a call occurs in that step range. The default for num-units is 1; the default for code-unit is STATEMENT. The IN clause is invalid for PATHWAY requester programs. OUT [ num-calls ] [ PROC[S] | SUBPROC[S] ] specifies the step amount as a number of call exits; that is, how many scope unit calls to return from.
Usage Consideration for Accelerated Programs High-Level Inspect Commands Inspect command. When a debug event (such as a break event) interrupts the sequence, a RETURN continues to mean “redo the STEP.” Breakpoints in Called Scope Units If you attempt to step over a call to a scope unit that contains a breakpoint, Inspect terminates the STEP command and stops in the called scope unit.
Limitation of the STEP Command High-Level Inspect Commands Limitation of the STEP Command Inspect does not support stepping execution from the throw statement to the catch statement. When issuing the STEP command on the throw statement, the program execution resumes. To suspend the program execution when an exception is thrown, set a breakpoint on a statement in the appropriate catch block. For example, 1. void func (int x) { 2. try { 3. if (x == 0) 4. throw "exception"; 5. cout << x; 6. } 7. catch(...
Default Value High-Level Inspect Commands STOP [ * | program ] program: one of program-number program-name cpu,pin * specifies all programs in the program list. program specifies a program using one of several formats. program identifies the program by its program number (as shown by the LIST PROGRAM command). program identifies the program by its name (as shown by the LIST PROGRAM command). program identifies the program by its process ID (CPU number and process number).
SYSTEM High-Level Inspect Commands is used to terminate the second process.
TERM High-Level Inspect Commands TERM The TERM command alters Inspect’s command terminal by changing the home terminal of the Inspect process to another terminal or a process. All programs being debugged retain their original home terminal. TERM { terminal | process } terminal: [ \system. ] $term-name process: [ \system. ] $name terminal specifies a terminal by its device name. process specifies a process name with an optional system name.
TIME High-Level Inspect Commands TIME The TIME command enables you to obtain the current time within Inspect. TIME [ /OUT/ ] file specifies the file to which TIME will write its output. Usage Considerations The TIME command is useful when performance measurements figures are needed against Inspect. The current time will be output in this form: YYYY-MM-DDhh.mm.ss.cc TRACE The TRACE command displays the call history of active scopes for the current program location.
Usage Considerations High-Level Inspect Commands space identifier (space ID). For the ENV register, the RP and CC values appear only for the first scope unit in the trace. If you specify ARGUMENTS, Inspect lists the formal parameter names and the actual parameter values for each call. If the scope unit has the VARIABLE or EXTENSIBLE attribute, only the supplied parameters are displayed. Numeric values (except the value of the L register) are displayed in the current output radix.
Related Commands High-Level Inspect Commands If the REGISTERS clause is specified, Inspect does not display stack marker information for subprocedures. If the ARGUMENTS clause is specified, Inspect does not display parameter names and values for subprocedures. Inspect excludes subprocedure entries from the call history if symbol information for the containing procedure does not exist.
Examples High-Level Inspect Commands value, or if an entry is shown as a block name and offset with no source line location, no symbols were available in that procedure; for example: -PRG-TRACE Num Lang Location 0 CBL #ATTEMPTDISPLAY.#1.4(QUEENSCS) 1 #APPLY + %17 2 CBL #QUEENSCO.#57(QUEENSCS) 3.
VOLUME High-Level Inspect Commands TRACE command shows the calling stack. The second TRACE command includes the ARGUMENT clause and shows the name and value of the parameters passed.
Default Value High-Level Inspect Commands Default Value If the volume/subvolume specification is omitted, the current Guardian subvol is changed to your initial Guardian subvolume. Usage Considerations Note that the VOLUME command requires a parameter; it cannot be used without parameters to restore original defaults. If Inspect is started using the command interpreter command Inspect, the default volume and subvolume in Inspect will be the command interpreter defaults.
Default Value High-Level Inspect Commands search-text is the most recent command line in the history buffer that begins with the text you specify. You need to specify only as many characters as necessary to identify the command line uniquely. "search-text” is like search-text except that the text may be anywhere in the line. Default Value If you do not specify a command line, Inspect reissues the last command line in the history buffer (excluding FA, FB, FC, XC, and !).
Related Commands High-Level Inspect Commands Inspect Manual—429164-006 6-226
7 Low-Level Inspect Low-Level Inspect Commands on page 7-1 Syntax of Low-Level Command Elements on page 7-2 Expressions in Low-Level Inspect on page 7-3 Using Low-Level Inspect on page 7-4 Low-Level Inspect Commands Low-level Inspect is similar to Debug, and this section discusses the major differences between the two debuggers. For more information on Debug for NonStop systems, see the Debug Manual. Table 7-1 shows how low-level Inspect commands correspond to Debug commands. Table 7-1.
Syntax of Low-Level Command Elements Low-Level Inspect Syntax of Low-Level Command Elements Low-level Inspect command syntax is based on the syntax of Debug commands. Inspect, however, allows symbolic references to code or data blocks in the break and clear commands. Inspect supports Debug syntax for referencing specific code and library segments in a multiple code segment program. For a detailed syntax description of each of the low-level Inspect commands, use the low-level Inspect HELP command.
I and S Suffixes Low-Level Inspect code block. If the address expression includes more than one code block reference, the first code block you specify determines the code segment. I and S Suffixes In low-level command syntax, the suffixes I and S always mean “indirect” and “string indirect” respectively; they do not mean “instructions” and “statements.” Expressions in Low-Level Inspect The syntax you use to enter an expression in low-level Inspect is based on Debug expression syntax.
Using Low-Level Inspect Low-Level Inspect # indicates a decimal, not octal, integer If you do not use any of these options, Inspect interprets number as a positive integer in octal notation. number [ .number ] specifies left and right words of a doubleword. Using Low-Level Inspect When using low-level Inspect, you need to know how low-level Inspect differs from high-level Inspect and how low-level Inspect differs from Debug. The following subsections discuss the differences.
Differences Between Low-Level Inspect and Debug Low-Level Inspect Differences Between Low-Level Inspect and Debug The following subsections highlight the differences between low-level Inspect and Debug. Low-level Inspect does not support the DEBUG ALL parameter when setting breakpoints. Low-level Inspect allows B (break) and C (clear) to refer to breakpoints by block name, representing the base of a program unit.
Differences Between Low-Level Inspect and Debug Low-Level Inspect amount: one of num T width * height base: A one of B D register: P R0 RA E R1 RB H I O X # one of L R2 RC S R3 RD R4 RE R5 RF R6 RG R7 RH The = Command In Debug, the = command supports these conversion modes: # Decimal A ASCII B Binary I ICODE E Environmental register (flags, RP setting) In low-level Inspect, the = command supports these additional modes: D Decimal H Hexadecimal O Octal X Hexadecimal ENV
Default Volume and Subvolume Low-Level Inspect When you use the E or ENV conversion modes, Inspect translates and displays the value as the stack marker ENV register; for example: _PROG_= 301 : env = (L=0,RP=1,CCG,K,T) UC.1 Default Volume and Subvolume In both high and low levels, the default volume and subvolume for an Inspect process started by the debugging facility are from your logon defaults, even if you have issued a command interpreter VOLUME command to change your session defaults.
Default Volume and Subvolume Low-Level Inspect Inspect Manual—429164-006 7-8
8 Using Inspect With C Starting to Debug a C Program on page 8-1 Scope Units and Scope Paths on page 8-1 Code Locations on page 8-2 Data Locations on page 8-5 Expressions on page 8-7 C Data Types and Inspect on page 8-8 Inspect Enhancements and Restrictions for C on page 8-10 Command Usage Guidelines for C Programmers on page 8-11 Starting to Debug a C Program When you start a C program, the C library performs certain start-up operations before your program begins executing.
Code Locations Using Inspect With C Code Locations Here is the syntax you use to identify C code locations in Inspect. code-location: { scope-path } [FROM module ] [ offset ]... { [scope-path.]code-spec } code-spec: one of function label statement-number #line-number [ (source-file) ] offset: { + | - } num [ code-unit ] code-unit: one of INSTRUCTION[S] STATEMENT[S] VERB[S] scope-path specifies the function containing the code location.
Usage Considerations Using Inspect With C ( ) qualifies the line number by the source file containing it. Use this option only if the source code for the given function is in more than one file. FROM module specifies the module in which the function containing the code location is defined. In HP C, the module name is the file name of the module’s base source file (the file specified as input to the HP C compiler). Use the FROM clause only if you have two functions of the same name.
Examples Using Inspect With C Specifying code locations by line number If no statement begins at the line number you specify, Inspect issues this warning: ** Inspect warning 117 ** A subsequent line number is assumed: line-number Inspect then uses the statement starting at the given line number. If more than one statement begins on the line you specify, Inspect uses the start of the first statement.
Data Locations Using Inspect With C Data Locations Here is the syntax you use to identify C data locations in Inspect. data-location: [ scope-path [ (instance) ] . ] data-reference [ #data-block. ] instance: [ + | - ] integer data-reference: one of identifier data-reference '[' subscript-range ']' data-reference.identifier data-reference->identifier *data-reference subscript-range: expression [ :expression ] scope-path [ (instance) ] specifies the function containing the data item.
Default Values Using Inspect With C identifier can also be the name of a structured object or user-defined data type; identifier then specifies the entire object or the type definition. data-reference '[' subscript-range ']' specifies an array object. subscript-range specifies the subscript of an array element or the subscript range of a group of array elements. data-reference.identifier specifies a field of a structure object.
Expressions Using Inspect With C Expressions Here is the syntax you use to create C expressions in Inspect. expression: one of primary *expression &expression -expression !expression ~expression expression binary-op expression primary: one of data-location constant string ( expression ) binary-op: * / << < != & one of % > ^ + <= | >= && >> == || Usage Considerations Operator precedence is the same as that defined in C.
C Data Types and Inspect Using Inspect With C C Data Types and Inspect The following subsections discuss how Inspect handles and presents various C data types. Bit Fields Inspect can access C bit fields for display or for expression evaluation.
Self-Referential Structures Using Inspect With C Self-Referential Structures This example displays two elements in a self-referential structure, using the C declarations: struct tnode { char *word; struct tnode *left; struct tnode *right; }; /* /* /* /* the basic node points to text left child right child */ */ */ */ struct tnode s, *sp; This example displays the structure s: -COBJ-DISPLAY s S = WORD = the value of word LEFT = pointer value RIGHT = pointer value This example displays the data to whic
Inspect Enhancements and Restrictions for C Using Inspect With C In this examples, the member is explicitly defined so that the value selected will be processed: -COBJ-DISPLAY uval.ival UVAL.IVAL = integer value ;COMMENT integer value displayed -COBJ-DISPLAY uval.fval ;COMMENT floating point value UVAL.FVAL = floating point value -COBJ-DISPLAY uval.pval ;COMMENT pointer type UVAL.
Command Usage Guidelines for C Programmers Using Inspect With C Command Usage Guidelines for C Programmers Guidelines for C programmers using Inspect are arranged alphabetically by Inspect command name. Not all commands are listed. BREAK A breakpoint set at the entry point to a function will occur before any initialization. If you set a breakpoint at an entry point, you should enter a STEP 1 STATEMENT command when Inspect stops there.
SCOPE Using Inspect With C SCOPE If you have identifiers of the same name in different scope units, be sure that you qualify the identifiers enough for Inspect to distinguish them. SET RADIX Even if you set your input radix to hexadecimal, you must still prefix a hexadecimal value with 0x or 0X if its first digit is aboveþ9; otherwise, Inspect interprets the value as an identifier. STEP The STEP command defaults to STATEMENTS if no code-unit is specified.
9 Using Inspect With C++ Starting to Debug a C++ Program on page 9-1 Scope Units and Scope Paths on page 9-1 Code Locations on page 9-2 Data Locations on page 9-5 Expressions on page 9-7 C++ Data Types and Inspect on page 9-8 Inspect Enhancements and Restrictions for C++ on page 9-9 Command Usage Guidelines for C++ Programmers on page 9-13 Starting to Debug a C++ Program When you start a C++ program, the C++ library performs certain start-up operations before your program begins executing.
Code Locations Using Inspect With C++ Code Locations Here is the syntax you use to identify C++ code locations in Inspect. code-location: { scope-path } [ FROM module ] [ offset ]... { [scope-path.]code-spec } code-spec: one of function label statement-number #line-number [ (source-file) ] class::function offset: { + | - } num [ code-unit ] code-unit: one of INSTRUCTION[S] STATEMENT[S] VERB[S] scope-path specifies the function containing the code location.
Usage Considerations Using Inspect With C++ #line-number [ (source-file) ] specifies the statement beginning at a given line number in the source file. ( ) qualifies the line number by the source file containing it. Use this option only if the source code for the given function is in more than one file. FROM module specifies the module in which the function containing the code location is defined.
Examples Using Inspect With C++ Specifying code locations by label You can use a C++ label as the code reference in a code location. However, because Inspect also accepts scope units as code references, a conflict arises if a label’s identifier is the same as the identifier for its containing function. Inspect interprets the identifier as a reference to the function, not to the label.
Data Locations Using Inspect With C++ Data Locations Here is the syntax you use to identify C++ data locations in Inspect. data-location: [ scope-path [ (instance) ] . ] data-reference [ #data-block. ] instance: [ + | - ] integer data-reference: one of identifier data-reference '[' subscript-range ']' data-reference.identifier data-reference->identifier *data-reference subscript-range: expression [ :expression ] scope-path [ (instance) ] specifies the function containing the data item.
Default Values Using Inspect With C++ specifies the entire object. When used in the INFO IDENTIFIER command, identifier can also be the name of a structured object or user-defined data type; identifier then specifies the entire object or the type definition. data-reference '[' subscript-range ']' specifies an array object. subscript-range specifies the subscript of an array element or the subscript range of a group of array elements. data-reference.identifier specifies a field of a structure object.
Expressions Using Inspect With C++ Expressions Here is the syntax you use to create C++ expressions in Inspect. expression: one of primary *expression &expression -expression !expression ~expression expression binary-op expression primary: one of data-location constant string ( expression ) binary-op: * / << < != & one of % > ^ + <= | >= && >> == || Usage Considerations Expression handling within Inspect does not support overloaded or redefined operators.
C++ Data Types and Inspect Using Inspect With C++ C++ Data Types and Inspect The following subsections discuss how Inspect handles and presents various C++ data types. Bit Fields Inspect can access C bit fields for display or for expression evaluation.
Unions Using Inspect With C++ Unions To access a particular union member, you must explicitly qualify that member. This qualification determines which field of the union Inspect accesses (which field type is actually accessed). In a display item, if you do not explicitly define the union member, Inspect displays the first member. Inspect Enhancements and Restrictions for C++ The following subsections discuss certain differences between programming with C++ and using Inspect to debug C++ programs.
Overloaded Operators Using Inspect With C++ -EDEMO-MATCH SCOPE funct Program Procedures: funct(void) funct(int) funct(int,int) -EDEMO-BREAK #funct Specified scope is ambiguous [1] funct(void) [2] funct(int) [3] funct(int,int) Which scope do you mean ([1], 2, ...)? 2 Num Type Subtype Location 1 Code #funct(int).#11 -EDEMO-LIST BREAK Num Type Subtype Location 1 Code #funct(int).#11 -EDEMOThe FROM clause can be used to specify which functions you want.
The this Pointer Using Inspect With C++ static int global_var; void member_func(void); }; int Example_Class::global_var; -PROGRAM-DISPLAY Example_Object Example_Object = Example_Class::local_var1 = 99 Example_Class::local_var2 = 45 The MATCH SCOPE command may be used to find the names of static data members.
Usage Considerations Using Inspect With C++ -PROGRAM-DISPLAY r r = 52 -PROGRAM-DISPLAY i i = -10 -PROGRAM-DISPLAY *r short = -10 Inspect does not support pointers to data members. Breakpoints are not supported for: Inlined functions Member functions of locally defined classes Cfront treats structures like classes. Inspect requires class-like syntax to access fields of structures. The source below was used to generate this example.
Command Usage Guidelines for C++ Programmers Using Inspect With C++ Command Usage Guidelines for C++ Programmers The following guidelines for C++ programmers using Inspect are arranged alphabetically by Inspect command name. Not all commands are listed. BREAK A breakpoint set at the entry point to a function will occur before any initialization. If you set a breakpoint at an entry point, you should enter a step over initialization before accessing any data.
MATCH Using Inspect With C++ MATCH Use the SCOPE clause of the MATCH command to find all the member functions of a given class. For example: -PROGRAM-MATCH SCOPE Class::* It can also be used to find all classes that implement a given function. For example: -PROGRAM-MATCH SCOPE *error SCOPE If you have identifiers of the same name in different scope units, be sure that you qualify the identifiers enough for Inspect to distinguish them.
10 Using Inspect With COBOL and SCREEN COBOL Scope Units and Scope Paths on page 10-1 Code Locations on page 10-2 Data Locations on page 10-5 Expressions on page 10-8 COBOL Data Types and Inspect on page 10-9 Inspect Enhancements and Restrictions for SCREEN COBOL on page 10-10 Command Usage Guidelines for COBOL Programmers on page 10-11 Note. In this section, the term COBOL refers to COBOL 74, COBOL85, and SCREEN COBOL.
Using Inspect With COBOL and SCREEN COBOL Code Locations Code Locations Here is the syntax you use to identify COBOL code locations in Inspect. code-location: { scope-path } [ offset ]... { [scope-path.]code-spec } code-spec: one of program-unit section paragraph [ OF section ] statement-number #line-number [ (source-file) ] offset: { + | - } num [ code-unit ] code-unit: one of INSTRUCTION[S] STATEMENT[S] VERB[S] scope-path specifies the scope path to the program unit containing the code location.
Using Inspect With COBOL and SCREEN COBOL Usage Considerations statement-number specifies the statement beginning at the given statement number. To see statement numbers, use the SOURCE command after you have set your location format to statements. For more information, see SET LOCATION FORMAT on page 6-175. #line-number [ (source-file) ] specifies the COBOL statement beginning at a given line number in the source file. (source-file) qualifies the line number by the source file containing it.
Using Inspect With COBOL and SCREEN COBOL COBOL 74 and SCREEN COBOL Examples Specifying code locations by line number If no COBOL statement begins at the line number you specify, Inspect issues this warning: ** Inspect warning 117 ** A subsequent line number is assumed: line-number Inspect then uses the statement starting at the given line number. If more than one COBOL statement begins on the line you specify, Inspect uses the start of the first statement.
Using Inspect With COBOL and SCREEN COBOL COBOL85 Examples COBOL85 Examples This example assume the COBOL85 program fragment: IDENTIFICATION DIVISION. PROGRAM-ID. a. ... IDENTIFICATION DIVISION. PROGRAM-ID. b. ... IDENTIFICATION DIVISION. PROGRAM-ID. c. ... END PROGRAM c. END PROGRAM b. END PROGRAM a. Here are some code locations: Code Location Specifies #A The primary entry point of program unit A. #A.B The primary entry point of program unit B. #A.
Using Inspect With COBOL and SCREEN COBOL Usage Considerations identifier specifies a data item in the program unit. OF identifier specifies the group data-item in which the given data item is declared. Like COBOL, Inspect requires only enough qualification to identify the data item uniquely. index specifies the subscript of an array element or the subscript range of a group of array elements.
Examples Using Inspect With COBOL and SCREEN COBOL Inspect, however, allows you to use subscripts instead of indices, so it will accept commands such as: -COBOBJ-DISPLAY x-tab(1), x-tab(5:9) -COBOBJ-MODIFY x-tab(r:r+9) ;COMMENT R is not USAGE INDEX -COBOBJ-BREAK x-handling+3S IF x-tab(1) > 2145 Examples This example assume these COBOL declarations: 01 master-file-rec. 03 mfr-employee-name.
Expressions Using Inspect With COBOL and SCREEN COBOL However, if you compile your program using the WITH DEBUGGING MODE clause in the SOURCE COMPUTER paragraph, these data item is available: DEBUG-ITEM Is a part of the ANSI Standard debugging mechanism. For more information, see the description of the USE statement in the COBOL85 for NonStop Systems Manual. DEBUG-ITEM is mainly used for non-interactive debugging, but the PROGRAMSTATUS and GUARDIAN-ERR registers can be helpful in debugging with Inspect.
Using Inspect With COBOL and SCREEN COBOL COBOL Data Types and Inspect COBOL Data Types and Inspect The following subsections discuss how Inspect handles and presents various COBOL data types. Record Types This example assume these COBOL record declarations: 01 office-record. 05 room-number 05 address 05 square-footage PIC X9(4) VALUE "A4294". PIC X(35) VALUE "555 12th Street". PIC 999V99 VALUE 113.40 USAGE IS COMPUTATIONAL. PIC 9(10) VALUE 9113732411.01 05 phone-number lumber-table.
Using Inspect With COBOL and SCREEN COBOL Inspect Enhancements and Restrictions for SCREEN COBOL access^info: 'L'+%22S WORDS dimension^info: [1:2,1:6] structure^info: PARENT=WIDTH -COBOBJ-INFO IDENTIFIER width WIDTH: VARIABLE storage^info: TYPE=CHAR, ELEMENT LEN=8 BITS, UNIT SIZE=4 ELEMENTS access^info: 'L'+%22S WORDS dimension^info: [1:2,1:6] structure^info: PARENT=THICKNESS,CHILD=PRICE -COBOBJ-INFO IDENTIFIER thickness THICKNESS: VARIABLE storage^info: TYPE=CHAR, ELEMENT LEN=8 BITS, UNIT SIZE=24 ELEMENT
Using Inspect With COBOL and SCREEN COBOL Command Usage Guidelines for COBOL Programmers The STEP IN and STEP OUT commands The STOP command The TRACE command's REGISTERS clause Command Usage Guidelines for COBOL Programmers The following guidelines for COBOL programmers using Inspect are arranged alphabetically by Inspect command name. Not all commands are listed. BREAK You can set a breakpoint at a line number, a paragraph, a paragraph of a section, a section, or the program entry point.
Using Inspect With COBOL and SCREEN COBOL DISPLAY If you set a data breakpoint within a group item, and your program moves a value to the group, the break event occurs before the move operation is complete because COBOL always uses byte moves for group items. DISPLAY The DISPLAY command does not display FILLER items in records unless you use the WHOLE clause. There are significant differences between the PIC clause of the DISPLAY command and the COBOL PICTURE clause.
Using Inspect With COBOL and SCREEN COBOL MODIFY When you request information about all identifiers in a program unit, Inspect lists the identifiers in the reverse order of declaration for COBOL 74 and COBOL85; Inspect lists the identifiers in alphabetical order for SCREENþCOBOL. MODIFY A MODIFY command operating on an edited field does not edit. Inspect functions just as the VALUE clause does, inserting a character value into the data item unchanged.
Using Inspect With COBOL and SCREEN COBOL STEP entire PERFORM scope (including any TIMES or UNTIL constraints) before you are prompted again. If you want to step through the code within the PERFORM scope, you must set a breakpoint at the label that marks the beginning of the PERFORM scope. You can then enter a STEP command when Inspect reports the break event.
11 Using Inspect With FORTRAN Scope Units and Scope Paths on page 11-1 Code Locations on page 11-2 Data Locations on page 11-5 Expressions on page 11-8 FORTRAN Data Types and Inspect on page 11-8 Inspect Enhancements and Restrictions for FORTRAN on page 11-11 Command Usage Guidelines for FORTRAN Programmers on page 11-11 Scope Units and Scope Paths FORTRAN has three types of scope units: program, subroutine, and function.
Code Locations Using Inspect With FORTRAN Code Locations .Here is the syntax you use to identify FORTRAN code locations in Inspect. code-location: { scope-path } [ offset ]... { [scope-path.]code-spec } code-spec: one of scope-unit statement-function statement label entry point statement-number #line-number [ (source-file) ] offset: { + | - } num [ code-unit ] code-unit: one of INSTRUCTION[S] STATEMENT[S] VERB[S] scope-path specifies the program unit containing the code location.
Usage Considerations Using Inspect With FORTRAN entry-point specifies an entry point. statement-number specifies the statement beginning at the given statement number. The SET LOCATION FORMAT command is used to differentiate between statementlabel and statement-number. For more information, see Usage Considerations. To see statement numbers, use the SOURCE command after you have set your location format to statements. For more information, see SET LOCATION FORMAT on page 6-175.
Examples Using Inspect With FORTRAN Specifying code locations by line number If no statement begins at the line number you specify, Inspect issues this warning: ** Inspect error 117 ** A subsequent line number is assumed: line-number Inspect then uses the statement starting at the given line number. If more than one statement begins on the line you specify, Inspect uses the start of the first statement. Specifying statement-number or statement-label.
Data Locations Using Inspect With FORTRAN #43 #44 #45 goto 25 else assign 30 to next This example assume this FORTRAN program fragment in a subroutine named LOSSES: Here are some code locations: Code Location Specifies #LOSSES The primary entry point of subroutine LOSSES. #LOSSES.100 The statement at label 100. #LOSSES.100 -1S The statement before label 100. #LOSSES.THRESHOLD The statement function THRESHOLD. SUBROUTINE LOSSES COMMON /TALLIES/ COLLAPSE, OSCILLATE ...
Default Values Using Inspect With FORTRAN (instance) identifies a specific activation of the data item's parent program unit. You need to specify an instance only when you want to identify a local data item in a recursive program unit. data-reference specifies the data item using FORTRAN syntax. The recursion in the definition of data-reference enables you to refer to complex FORTRAN data structures. identifier specifies a simple variable.
Examples Using Inspect With FORTRAN Subscripting data locations in Inspect is the same as in FORTRAN. For example, this DDL structure requires three subscripts when you refer to the data item SUBFIELD: RECORD REC. 03 SUBREC OCCURS ... 05 FIELD OCCURS ... 07 SUBFIELD OCCURS ... A data reference to SUBFIELD must include subscripts for all of its parent data items: REC^SUBREC(X)^FIELD(Y)^SUBFIELD(Z) Statement functions are treated as subprocedures.
Expressions Using Inspect With FORTRAN These data locations assume a current scope path of #LOSSES: Data Location Specifies X(5+I,4) An element of the array X. COLLAPSE The variable COLLAPSE in the COMMON block TALLIES. Note that the elements of a COMMON block have a subprogram as their scope unit, not the COMMON block. Expressions Here is the syntax you use to create FORTRAN expressions in Inspect. expression: condition [ bool-op condition ]... bool-op: .AND. one of .OR. .EQV. .NEQV.
Arrays Using Inspect With FORTRAN Arrays Inspect supports all FORTRAN array types, including multidimensional arrays and arrays of records.
Records Using Inspect With FORTRAN This example displays the entire array: -FORTOBJ-DISPLAY a A[1,1] = 101 201 301 401 501 601 701 801 901 1001 A[1,2] = 102 202 302 402 502 602 702 802 902 1002 A[1,3] = 103 203 303 403 503 603 703 803 903 1003 A[1,4] = 104 204 304 404 504 604 704 804 904 1004 A[1,5] = 105 205 305 405 505 605 705 805 905 1005 A[1,6] = 106 206 306 406 506 606 706 806 906 1006 A[1,7] = 107 207 307 407 507 607 707 807 907 1007 A[1,8] = 108 208 308 408 508 608 708 808 908 1008 A[1,9] = 109 209
Inspect Enhancements and Restrictions for FORTRAN Using Inspect With FORTRAN This example displays the record using Inspect's default formatting: -FORTOBJ-DISPLAY rec REC = DATE = "082282" AMOUNT = "000405" This example displays a single field of the record: -FORTOBJ-DISPLAY rec^amount REC^AMOUNT = "000405" This example displays the record, suppressing the identifiers and quotes: -FORTOBJ-DISPLAY rec PLAIN 082282 000405 This example displays the whole record, including the FILLERs: -FORTOBJ-DISPLAY rec WH
BREAK Using Inspect With FORTRAN BREAK A break set at the entry point to a scope unit occurs before any initialization. If you set a breakpoint at a scope unit's entry point, you should enter a STEP 1S command after the breakpoint is triggered. Because a data breakpoint is associated with a single word, an identifier designating multiple words (such as COMPLEX, DOUBLE PRECISION, or RECORD) has only its first word marked as the breakpoint.
INFO OPENS Using Inspect With FORTRAN names, so you must qualify a statement function name with its scope name if you want to request information on the attributes of a statement function. The data types reported by Inspect are not designated in terms of any one language. Therefore, FORTRAN integers are marked as BIN SIGN, while FORTRAN real, complex, logical, and character items are marked as REAL, COMPLEX, LOGICAL, and CHAR, respectively.
STEP Using Inspect With FORTRAN STEP FORTRAN tests for continuation of a DO loop at the end of the loop. Consequently, a STEP 1S command at the beginning of a DO loop takes you to the terminal statement of the loop. A subsequent STEP 1S command takes you to the statement following the DO. TRACE The TRACE ARGUMENTS command shows the arguments for the primary entry point of a scope unit. If a secondary entry point has a different set of arguments, TRACE ARGUMENTS does not display them.
12 Using Inspect With Pascal Scope Paths and Scope Units on page 12-1 Code Locations on page 12-2 Data Locations on page 12-5 Expressions on page 12-7 Pascal Data Types and Inspect on page 12-7 Inspect Enhancements and Restrictions for Pascal on page 12-15 Command Usage Guidelines for Pascal Programmers on page 12-15 Scope Paths and Scope Units Pascal has two types of scope units: procedure and function.
Code Locations Using Inspect With Pascal Code Locations Here is the syntax you use to identify Pascal code locations in Inspect. code-location: { scope-path } [FROM module ] [ offset ]... { [scope-path.]code-spec } code-spec: one of scope-unit label statement-number #line-number [ (source-file) ] offset: { + | - } num [ code-unit ] code-unit: one of INSTRUCTION[S] STATEMENT[S] VERB[S] scope-path specifies the function containing the code location.
Usage Considerations Using Inspect With Pascal #line-number [ (source-file) ] specifies the statement beginning at a given line number in the source file. ( source-file) qualifies the line number by the source file containing it. Use this option only if the source code for the given function is in more than one file. FROM module specifies the module in which the function containing the code location is defined.
Examples Using Inspect With Pascal Inspect then uses the statement starting at the given line number. If more than one statement begins on the line you specify, Inspect uses the start of the first statement. The STATEMENT code unit and Pascal statements Inspect recognizes these as statements: Simple Pascal statements that are not part of a conditional or repetitive structured statement Pascal statements in a compound statement (BEGIN...
Data Locations Using Inspect With Pascal Data Locations Here is the syntax you use to identify Pascal data locations in Inspect. data-location: [ scope-path [ (instance) ] . ] data-reference [ #data-block. ] instance: [ + | - ] integer data-reference: one of identifier data-reference '[' index [ ,index]... ']' data-reference.identifier data-reference^ index: expression [ :expression ] scope-path [ (instance) ] specifies the scope path to the scope unit containing the data item.
Default Values Using Inspect With Pascal data-reference '[' index [ ,index ]... ']' specifies an array variable. index specifies the subscript of an array element or the subscript range of a group of array elements. data-reference.identifier specifies a field of a record variable. data-reference^ specifies the value referenced by a pointer or buffer (file) variable. Default Values If you do not specify scope-path, Inspect uses the current scope path.
Expressions Using Inspect With Pascal Expressions Here is the syntax you use to create Pascal expressions in Inspect. expression: simple-exp [ rel-op simple-exp ]... rel-op: one of = <> < > <= simple-exp: add-op: + - >= [ + | - ] term [ add-op term ]... one of OR term: factor [ mult-op factor ]...
Array Types Using Inspect With Pascal Array Types Inspect supports all Pascal array types, including multidimensional arrays and arrays of records.
File Types Using Inspect With Pascal Examples This example assume these Pascal declarations: TYPE fruit_type = (apples, oranges, bananas) VAR fruit : fruit_type When you use an identifier of enumerated type in a DISPLAY command, Inspect displays the enumeration value as declared in the TYPE declaration.
Record Types Using Inspect With Pascal Examples In the following type and variable declarations, link is defined as a pointer type pointing to a record of type object. The variables base and p are declared as pointers of type link: TYPE link = ^object; object = RECORD next : link; data : char END; VAR base, p : link; This example displays the pointer variable p, the record to which it points, a field of that record, and then a field in the record to which the record p^.
Record Types Using Inspect With Pascal VAR record_structure : tmprec; Inspect accesses records of this type as follows: -PASOBJ-DISPLAY record_structure RECORD_STRUCTURE = VAR1 = value of var1 VAR2 = value of var2 -PASOBJ-DISPLAY record_structure.var1 RECORD_STRUCTURE.
Set Types Using Inspect With Pascal This example shows explicit name qualification. Inspect follows the path given in the data location. The element can then be processed and displayed: -PASOBJ-DISPLAY football.d_backFOOTBALL.
Subrange Types Using Inspect With Pascal flag := (red,white,blue); ...
Subrange Types Using Inspect With Pascal When you use a variable of subrange type in a DISPLAY command, Inspect displays the variable of the host type.
Using Inspect With Pascal Inspect Enhancements and Restrictions for Pascal Inspect Enhancements and Restrictions for Pascal The following subsection discusses the difference between programming with Pascal and using Inspect to debug Pascal programs. Length of Identifiers Note that a Pascal identifier can be any length, but Inspect only accepts the first 31 characters.
MODIFY Using Inspect With Pascal of a record—requesting a listing of the attributes of the unqualified data name will produce an attribute listing for only the simple variable. You must qualify the name completely when you request a listing of the attributes for a record element. The data types reported by Inspect are not designated in terms of any one language.
13 Using Inspect With TAL and pTAL Scope Units and Scope Paths on page 13-1 Code Locations on page 13-1 Data Locations on page 13-5 Expressions on page 13-8 TAL and pTAL Data Types and Inspect on page 13-9 Command Usage Guidelines for TAL and pTAL Programmers on page 13-11 Scope Units and Scope Paths TAL and pTAL have only one type of scope unit: the procedure. When debugging a program written in TAL and pTAL, you must specify a procedure name whenever an Inspect command expects a scope unit.
Code Locations Using Inspect With TAL and pTAL code-offset: { + | - } num [ code-unit ] code-unit: one of INSTRUCTION[S] STATEMENT[S] scope-path specifies the procedure containing the code location. When followed by a code offset, scope-path specifies the base of the procedure; otherwise, scope-path specifies the primary entry point of the procedure. [ scope-path.
Usage Considerations Using Inspect With TAL and pTAL code-offset specifies an offset from the code location defined by the preceding options. A positive offset (+) denotes code following the specified code location; a negative offset (-) denotes code preceding the specified code location. The amount to offset is specified by a given number of units. If you omit the unit specifier, Inspect selects INSTRUCTION as the code unit for TAL or pTAL.
Examples Using Inspect With TAL and pTAL A code location must include scope-name qualification if it refers to a location outside the current scope. Inspect assumes a code location is in the current scope if no explicit scope qualifier is stated.
Data Locations Using Inspect With TAL and pTAL Data Locations Here is the syntax you use to identify TAL and pTAL data locations in Inspect. data-location: [ scope-path [ (instance) ] . ] [[ scope-path. ] subproc [ (instance) ]. [ #data-block. ] [ ##GLOBAL. ] ] data-reference instance: [ + | - ] integer data-reference: one of identifier data-reference '[' subscript-range ']' data-reference.
Default Values Using Inspect With TAL and pTAL defined data type; identifier then specifies the entire variable or the type definition. data-reference '[' subscript-range ']' specifies an array variable. subscript-range specifies the subscript of an array element or the subscript range of a group of array elements. data-reference.identifier specifies a field of a structure variable. Default Values If you do not specify scope-path, Inspect uses the current scope path.
Usage Considerations for TAL Programs Using Inspect With TAL and pTAL Within a scope, you can access the same index register with the USE and DROP statements more than once, as long you do not use the same name. In this example, the name INDEX^REG is assigned to a register more than once in a scope: USE index^reg; FOR index^reg := 1 TO 10 DO X[index^reg] := index^reg; DROP index^reg; ...
Expressions Using Inspect With TAL and pTAL -C20FOBJ2-SOURCE BACK 40 #1 ! ++++ subprocedure heading ++++ #2 #3 subproc sub_scope_n ( sub_scope_level, subparam_s8, #4 subparam_i16, subparam_i32, #5 subparam_f64, subparam_r32, #6 subparam_r64, subparam_s8p, #7 subparam_i16p, subparam_i32p, #8 subparam_f64p, subparam_r32p, #9 subparam_r64p ); #10 -C20FOBJ2-TRACE ARG Num Lang Location (Arguments) TAL .SUB_SCOPE_N: #SCOPE_N.#37(C20FTALK) 0 TAL #SCOPE_N.
Usage Considerations Using Inspect With TAL and pTAL primary: one of data-location .data-location @data-location number (expression) Usage Considerations Operator precedence is the same as the precedence defined for TAL and pTAL. To refer to the contents of the pointer named XX, use the expression (@XX). To refer to the contents of the indirect variable to which XX points, use XX.
Structures and Substructures Using Inspect With TAL and pTAL access^info: 'L' + 1 WORDS dimension^info: [0:9] Structures and Substructures Inspect supports TAL and pTAL structures and substructures, as shown in the following example, which assume these TAL declarations: STRUCT alphabetics; BEGIN STRING caps [1:26]; STRING smalls [1:26]; STRING misc [1:10]; END; STRUCT name^middle^last; BEGIN STRING first^initial; STRING middle^name [0:19]; STRING last^name [0:19]; STRUCT birth; BEGIN INT year; INT month;
Command Usage Guidelines for TAL and pTAL Programmers Using Inspect With TAL and pTAL This example displays the structure NAME^MIDDLE^LAST: -TALOBJ-DISPLAY name^middle^last NAME^MIDDLE^LAST = FIRST^INITIAL = "M" MIDDLE^NAME[0] = "Treuhardt LAST^NAME[0] = "Korhummel BIRTH = YEAR = 1844 MONTH = 10 DAY = 31 " ?0 " ?0 This example displays the structure NAME^MIDDLE^LAST, suppressing the identifiers and quotes: -TALOBJ-DISPLAY name^middle^last PLAIN M Treuhardt ?0 Korhummel ?0 1844 10 31 This example display
DISPLAY Using Inspect With TAL and pTAL When you use a code offset to specify the location of a code breakpoint, Inspect does not ensure that the location specifies executable code. If the location is in a P-relative array, the breakpoint may alter the data in the array. Because a data breakpoint is associated with a single word, an identifier designating multiple words (STRUCT, INT(32), REAL(64) and so on) has only its first word marked as the breakpoint.
MODIFY Using Inspect With TAL and pTAL MODIFY To modify a string data item, use the subscript range form: -TALOBJ-MODIFY x^string [0:10] := "abcdefghij" You can specify the name of a structure in a MODIFY WHOLE command, but Inspect requires that you include the new values in the command. MODIFY does not prompt for values when you use the WHOLE clause. As in TAL and pTAL, you can MODIFY a variable that is equated to another variable.
TRACE Using Inspect With TAL and pTAL If you are stepping over a procedure and a debugging event occurs while that procedure/subprocedure is executing or a procedure/subprocedure that it calls is executing, execution is suspended where the event occurs. Among other reasons, this can happen if you placed a breakpoint in a called procedure/subprocedure. You can use the STEP OUT command to return back to the level at which execution was originally stepped.
14 Using Inspect in an OSS Environment Starting an Inspect Session on page 14-1 Ending an Inspect Session on page 14-2 Inspect’s System Type on page 14-2 File Name Resolution on page 14-2 Signals on page 14-3 Source Files on page 14-4 Usage Guidelines on page 14-4 Starting an Inspect Session You can start an Inspect session in OSS in any of these four ways: From the TACL prompt, enter: >RUN INSPECT or INSPECT From the OSS shell, enter: gtacl -p inspect From TACL prompt, you enter: RU
Ending an Inspect Session Using Inspect in an OSS Environment Ending an Inspect Session Ending an Inspect session is the same regardless of the platform or environment. An Inspect session can be stopped in the following ways: You exit by using the EXIT command or the RESUME * EXIT command. Your last program has completed. Your program is stopped by someone else.
Save Files Using Inspect in an OSS Environment The CD command can be used to change the default OSS directory. The ENV command can be used to display both the defaults. For more information, see VOLUME on page 6-223, CD on page 6-27, or ENV on page 6-81. Save Files The same events that cause a save file to be created for Guardian processes cause save files to be created for OSS processes.
Source Files Using Inspect in an OSS Environment Examples 1. This example illustrates the MODIFY command with default arguments. -test4--- Default arguments for MODIFY SIGNALS -test4---test4-MODIFY SIGNAL SIGUSR1 Signal SIGUSR1(16) Handler = SIG_DFL := #func_1 Mask = 0 := 100 Flags = 0 := 500 -test4-INFO SIGNAL SIGUSR1 Signal Handler Mask SIGUSR1(16) func_1 100 Flags 500 2. This example illustrates MODIFY without default arguments.
Usage Guidelines Using Inspect in an OSS Environment Table 14-1. DBX/Inspect Command Map DBX Inspect DBX Inspect alias ADD ALIAS, LIST ALIAS return STEP with the OUT option assign MODIFY run RESUME catch N/A rerun N/A cont RESUME set N.
Usage Guidelines Using Inspect in an OSS Environment Table 14-2. Inspect Commands Without a DBX Counterpart Command Description Info Segment List currently allocated extended segments Info Opens List files opened by current process Add Program Add a program to the current Inspect session List Program Inspect is able to debug multiple programs Select Program Select the current program. This can also be used to load new symbol files for the specified program.
15 Using Inspect on a TNS/R System TNS/R Overview on page 15-2 Executing Non-Accelerated Programs on page 15-2 Executing Accelerated Programs on page 15-3 General TNS/R Debugging Considerations on page 15-5 Debugging Non-Accelerated Programs on page 15-5 Debugging Accelerated Programs on page 15-5 Debugging TNS/R Native Programs on page 15-7 Performance and Debugging of TNS/R Programs on page 15-7 Register Usage on page 15-7 Pipeline Instruction Processing on page 15-8 Opti
TNS/R Overview Using Inspect on a TNS/R System TNS/R Overview TNS/R computers support the HP NonStop operating system and existing applications, but are based on reduced instruction set computing (RISC) technology. Inspect supports the debugging of TNS, accelerated, and native TNS/R programs on TNS/R systems. Much of the code in HP-supplied software products for TNS/R systems has been produced by TNS/R native compilers. You can also use native compilers to produce your own native TNS/R code.
Executing Accelerated Programs Using Inspect on a TNS/R System When you execute a TNS object file on a TNS/R machine, the TNS instructions that it contains are executed by means of millicode. Millicode implements the actions of TNS machine instructions using the appropriate TNS/R instructions. It may be easier to debug a program executing TNS object code than to debug a program executing code generated by the accelerator.
Executing Accelerated Programs Using Inspect on a TNS/R System Some TNS program constructs require evaluation at execution time, and their behavior in all cases cannot be predicted by the accelerator. For such constructs, such as a SETP instruction, the accelerator generates code that checks if the conditions required by the generated code are met.
General TNS/R Debugging Considerations Using Inspect on a TNS/R System General TNS/R Debugging Considerations These considerations apply when debugging non-accelerated, accelerated, and native programs on a TNS/R machine. Data breakpoints Data breakpoints might be reported at different locations than on a TNS system. Data representation Data is represented the same as on TNS systems. Data pointer values and stack frames are the same.
Debugging Accelerated Programs Using Inspect on a TNS/R System The contents of memory might be stale, that is, data may be stored in registers and will be stored in memory later. Data may be pre-fetched from memory into registers, causing the modification of memory to have no effect on program behavior. The TNS registers may not be up to date.
Debugging TNS/R Native Programs Using Inspect on a TNS/R System Displayed TNS register values are often out of date. You can rarely modify TNS registers to affect program behavior.
Pipeline Instruction Processing Using Inspect on a TNS/R System performed while also ensuring that locations exist, usually at the beginning of statements, where the TNS program state is consistent. Example This example illustrates how optimized code increases performance by utilizing registers to reduce memory accesses. The use of general purpose registers by the accelerator can have a number of effects on debugging.
Optimizations With Branches Using Inspect on a TNS/R System The position following a load instruction is referred to as a load delay slot. Dummy instructions or NOP instructions can always be placed in delay slots. As part of its optimization process, the compiler attempts to place useful instructions in load delay slots. The only requirement is that the instruction cannot depend on the data being loaded.
TNS Instruction Side Effects Using Inspect on a TNS/R System 4. Store the value of j in i TNS Instruction Side Effects Many TNS instructions update the machine state, such as registers R0-R7 and status flags in the TNS environment register, the most common being the condition code flags. The effects that instructions have on environment register flags are often referred to as instruction side effects. The TNS/R processor does not have the same registers as the TNS processor.
TNS/R Breakpoints Using Inspect on a TNS/R System For more information about compilers, see the C/C++ Programmer’s Guide, the COBOL Manual for TNS and TNS/R Programs, and the pTAL Reference Manual. TNS/R Breakpoints When debugging Accelerated programs, you can list and clear TNS/R breakpoints, but not set them. You must set TNS/R breakpoints from Debug. There are specific rules that apply to setting TNS/R breakpoints; for more information, see the Debug Manual.
Machine Code Addresses Using Inspect on a TNS/R System Register aliases are used when TNS/R instructions are displayed. General purpose TNS/R registers may also be identified using one or more aliases.
Save Files Using Inspect on a TNS/R System Save Files TNS/R register values are stored in save files created for accelerated and native programs. TNS/R Machine-Level Commands Inspect provides minimal support for machine-level debugging of native and accelerated programs. The following subsections briefly describe the commands Inspect supports. For more information, see Section 6, High-Level Inspect Commands.
TNS/R Machine-Level Commands Using Inspect on a TNS/R System For example: -ICODE AT #15 #15 %001354: > %001355: %001356: %001357: #16 %001360: %001361: #17 %001362: %001363: FOR 3 BOTH LOAD LDI IMPY STOR L+002 +005 %h7042003C: %h70420040: %h70420044: %h70420048: %h7042004C: %h70420050: %h70420054: %h70420058: %h7042005C: %h70420060: LH NOP SLL ANDI MOVE ADD ADD ADD SRL SH s0,4(fp) > LDI STOR +001 L+002 %h70420064: %h70420068: LI SH s0,1 s0,4(fp) > LDI EXIT +000 03 %h7042006C: %h70420070: %h7
16 Using Inspect With Accelerated Programs on TNS/R Systems Accelerated Program Debugging Overview Assumptions on page 16-2 Variances on page 16-2 Performance and Debugging of Accelerated Programs on page 16-3 Accelerated Program Transitions on page 16-3 Accelerated Program Debugging Concepts on page 16-4 Debugging Boundaries on page 16-5 Accelerator Debugging Options on page 16-6 Using Inspect to Debug Accelerated Programs on page 16-8 Program Libraries on page 16
Using Inspect With Accelerated Programs on TNS/R Systems Assumptions correspondence between the state of the accelerated program and the state it would have if executed on a TNS system—do not exist at all program locations. When not at a synchronization point, memory and TNS registers may be “out of date.” Both the hardware features of the system and the optimizations performed by OCA may result in some debugging and execution differences when compared with execution on a TNS system.
Using Inspect With Accelerated Programs on TNS/R Systems Performance and Debugging of Accelerated Programs Performance and Debugging of Accelerated Programs When you accelerate your program, instructions have been reordered and some may have been eliminated as a result of optimizations. As a result, the correspondence between TNS and TNS/R instructions has disappeared at most locations. A block of TNS/R instructions corresponding to a TNS instruction may be interleaved with other TNS/R instructions.
Using Inspect With Accelerated Programs on TNS/R Systems Accelerated Program Debugging Concepts Execution can only switch between TNS and TNS/R instructions at points where all values have been saved from the TNS/R system registers into memory and the representation of the TNS machine state is accurate. The accelerator defines such points, referred to as register-exact points, where necessary for this purpose. Registerexact points are most commonly found following procedure and subprocedure calls.
Using Inspect With Accelerated Programs on TNS/R Systems Debugging Boundaries Data display restrictions The accelerator improves program performance by keeping the values of frequently used variables in TNS/R system registers. The debugger does not have information indicating when variables are stored in these registers. Such optimizations may therefore result in displayed memory values being out of date, because a more recent copy is stored in memory. Note.
Using Inspect With Accelerated Programs on TNS/R Systems Accelerator Debugging Options Accelerator Debugging Options The accelerator debugging option you use slightly affects source-level debugging and significantly affects machine-level debugging. It affects the organization of TNS/R instructions, and the number of register-exact points in your program. The accelerator offers you two debugging options—ProcDebug and StmtDebug.
Accelerator Debugging Options Using Inspect With Accelerated Programs on TNS/R Systems Level Required User Knowledge Where Capabilities Source level User’s own program Memory-exact points Statement breakpoints, stepping, display variables TNS machine level TNS system Register-exact points TNS instructions breakpoints, stepping, display and modify data and TNS system registers TNS/R machine level TNS/R system, Accelerator Anywhere (requires Debug to set TNS/R instruction breakpoints) TNS/R i
Using Inspect to Debug Accelerated Programs Using Inspect With Accelerated Programs on TNS/R Systems Table 16-1.
Using Inspect With Accelerated Programs on TNS/R Systems Data Breakpoints Note. Note that “deleted” does not mean that the actions of your statements have been deleted, but that optimization has merged the statement with another which resulted in the statement not being available for debugging. Usage Considerations for Accelerated Programs The INFO LOCATION command marks statement locations at which breakpoints cannot be set as “deleted.
Using Inspect With Accelerated Programs on TNS/R Systems Data Breakpoints Four Cycle Delay Reporting Data Breakpoints The pipelined TNS/R system architecture results in data breakpoints being reported four cycles after the access occurs. If a branch or procedure return occurred during that time, the current location when the breakpoint is reported could be far from the location that made the memory access. No additional data breakpoints will be triggered during the four cycle delay.
Using Inspect With Accelerated Programs on TNS/R Systems Data Breakpoints main-flag would have changed in line #13970. The actual place where the memory access occurred is somewhere between the reported (approximate) location, line #13970, and the next exact point (note that line #13980 is deleted, so the next exact point is line #13990). Therefore, in this case the actual memory access occurred somewhere during execution of lines #13970 or #13980.
Using Inspect With Accelerated Programs on TNS/R Systems Data Breakpoints Data breakpoints of type change There may be occasions when data breakpoints will not be reported.
Using Inspect With Accelerated Programs on TNS/R Systems Data Breakpoints Read/write data breakpoints are available on both TNS and TNS/R processors. When data breakpoints are set on read/write access on a TNS/R system, the operating system or Inspect cannot filter unrelated accesses. You will have to use context information associated with the program's current location to determine breakpoints of interest.
Using Inspect With Accelerated Programs on TNS/R Systems Event Reporting Some COBOL constructs, such as IF or AT END, may not result in memory-exact points, and section and paragraph names may not result in register-exact points even if the accelerator optimization level is set to StmtDebug. Therefore, it may not be possible to set code breakpoints at some such locations or to use the RESUME AT command.
Using Inspect With Accelerated Programs on TNS/R Systems Data Access Limitations There are some debugging events that may be reported when the current location is a non-exact (not a memory-exact) point: i A data breakpoint. A process entry into Inspect. A run-time trap. An INSPECT HOLD command issued to suspend a running process. A TNS/R code breakpoint. (TNS/R code breakpoints may only be set in Debug.
Using Inspect With Accelerated Programs on TNS/R Systems TNS Register Access Limitations At Memory-Exact Points When the current program location is a memory-exact point that is not a register-exact point, you can display memory with reliable results. The accelerator defines memory-exact points such that all preceding memory store operations have completed. Unless the point is a register-exact point, values used by subsequent statements might already be loaded in TNS/R registers.
Using Inspect With Accelerated Programs on TNS/R Systems Commands Useful When Debugging Accelerated Programs At Memory-Exact Points You can display values of TNS registers at a memory-exact point; however, displayed values may be out of date.
INFO OBJECTFILE Using Inspect With Accelerated Programs on TNS/R Systems INFO OBJECTFILE The INFO OBJECTFILE command gives information about the current program’s object file. If you are running an accelerated program, displayed information includes the options with which your program was accelerated and when it was accelerated.
Using Inspect With Accelerated Programs on TNS/R Systems RESUME AT When the accelerator state is at a memory-exact or a register-exact point, the reported current location is exact. When the accelerator state is a non-exact point, the current location is a approximate. This means that the program is suspended between the reported location and the next exact point.
Using Inspect With Accelerated Programs on TNS/R Systems SET PROMPT/SET STATUS SET PROMPT/SET STATUS The following status tokens could be helpful when used with the SET STATUS and SET PROMPT commands: ACCELERATOR STATE INSTRUCTION SET PROCESSOR Examples This example shows, how you might set your prompt to include accelerator state information: SET PROMPT = LEVEL,PROGRAM NAME,"[ ",ACCELERATOR STATE, " ]", STEP, LEVEL This will result in prompts of the following form: -ATMSRV[ memory-exact ]-
Using Inspect With Accelerated Programs on TNS/R Systems STEP Example The following example illustrates use of the SOURCE command to determine your program’s current location and identify points that are register-exact or memory-exact points. -PTALIN-SOURCE FOR 10*#75.1 i := 1; #76 a := 1; #77 CALL s1; @#78 CALL s2( a, a, a ); @#79 CALL s3; -#80 b := a; #81 #82 CALL PROC1( 1, 2D, sptr ); @#84 CALL PROC2( 1, 2D, sptr ); #84.
Annotated ICODE Using Inspect With Accelerated Programs on TNS/R Systems Accelerating a program may cause fewer step operations to be required to step execution through some looping constructs. Depending on compiler code generation, the accelerator may branch execution to the middle of a statement, where there is no memory-exact point. Since STEP operations always leave a program at a memory-exact point, execution of the program will not be suspended until the next memory-exact point is reached.
Using Inspect With Accelerated Programs on TNS/R Systems Annotated ICODE When debugging accelerated programs, TNS instruction code mnemonics listed by the SOURCE ICODE and ICODE command and the low-level I command are annotated to indicate which locations are register-exact points (@) and which are memory-exact points (>). i Character Description @ The instruction is at a register-exact point. > The instruction is at a memory-exact point.
Using Inspect With Accelerated Programs on TNS/R Systems Inspect Manual—429164-006 16-24 Annotated ICODE
17 Using Inspect With TNS/R Native Programs TNS/R Native Overview TNS/R Native Program Debugging Concepts on page 17-1 TNS/R Native Compilers and Linkers on page 17-2 Optimization Levels on page 17-3 Using Inspect to Debug TNS/R Native Programs on page 17-4 SRLs on page 17-4 Dynamic-Link Libraries (DLLs) on page 17-5 Code Breakpoints on page 17-6 Signals on page 17-6 Commands Useful When Debugging Native Programs on page 17-6 Debugging at the TNS/R Native Machine Level on page
Using Inspect With TNS/R Native Programs TNS/R Native Compilers and Linkers deleted statements and the inability to modify memory safely.) Traditionally, optimized code is difficult to debug because instructions can be reordered enough to blur the correspondence of instructions to source code. Debugging a TNS/R native program is similar to debugging the RISC portions of an accelerated program, but you should be aware of a few differences.
Using Inspect With TNS/R Native Programs Optimization Levels To debug a TNS/R program that contains position-independent code (PIC), you must use Visual Inspect. Optimization Levels Debugging TNS/R native processes differs from debugging TNS or accelerated processes. Unlike TNS and accelerated processes, TNS/R native processes do not maintain the TNS process environment, such as the TNS environment registers. The C, C++, and pTAL compilers support three optimization levels: 0, 1, and 2.
Using Inspect With TNS/R Native Programs Using Inspect to Debug TNS/R Native Programs Table 17-1. Optimization Levels Level Optimization Performed Debugging Capabilities 0 None. Variables are loaded into registers, calculations are performed, and variables are immediately updated in memory. Statement boundaries are maintained. Delay slots in instructions sequence are filled with no-operation instructions. Full source-level debugging capability.
Using Inspect With TNS/R Native Programs Dynamic-Link Libraries (DLLs) TNS/R native user libraries are implemented as a special form of a native shared runtime libraries (SRLs). From a debugging perspective, this special form of SRL behaves the same as a TNS user library. The process memory architecture and implementation of TNS/R native user libraries differs from TNS user libraries. The distinction between user code and user library space (UC and UL) does not exist in TNS/R native processes.
Using Inspect With TNS/R Native Programs Code Breakpoints Code Breakpoints When debugging a TNS/R program, you can set code breakpoints at any location in the program. To set a breakpoint in native code, you can either specify a scope name or a machine-level code address. Signals TNS and accelerated processes use a trap mechanism for exception handling. TNS and accelerated processes in the OSS environment can also use a signal mechanism for exception handling.
DISPLAY REGISTER Using Inspect With TNS/R Native Programs DISPLAY REGISTER The DISPLAY REGISTER command displays the virtual frame pointer (VFP) for TNS/R native stack frames. In addition, the contents of the registers will be relative to the current stack frame. This means that as the current scope is changed to an active stack frame, the register values will be what they were in that stack frame.
INFO IDENTIFIER Using Inspect With TNS/R Native Programs 17.000 #18 18.000 18.000 18.000 18.000 18.000 18.000 -PROGRAM- %h700002E8: lw $10,16($gp) %h700002EC: %h700002F0: %h700002F4: %h700002F8: %h700002FC: %h70000300: move move move move jal sw $5,$15 $4,$14 $6,$15 $7,$9 0x70000290 $11,$16($sp) INFO IDENTIFIER The INFO IDENTIFIER command displays information about TNS/R native symbols.
INFO SAVEFILE Using Inspect With TNS/R Native Programs accelerated object files, items with “*3” apply only to TNS/R native object files, and items with “*4” apply only to native SRL object files. INFO SAVEFILE The INFO SAVEFILE command displays information about save files. Save files can be located within the Guardian file system, or the OSS file system. The output displays new information related to SRLs and native processes.
INFO SIGNALS Using Inspect With TNS/R Native Programs Output Scope Name: name Source File: file Modification timestamp: timestamp Compilation timestamp: timestamp Language: lang Type: CODE Base: integer Entry: integer Length: integer words [Optimization level: integer] *1 INFO SIGNALS The accepted syntax of the INFO SIGNALS command has not changed. The command will no longer be restricted to OSS processes, and the output will change to accommodate a 128-bit signal mask.
MODIFY SIGNALS Using Inspect With TNS/R Native Programs [ [ Program File: /usr/people/paul/bin/a.out Libraries: /usr/lib/libc.a /usr/lib/libil8n.c State: HOLD System: \CUBS (175) Type: TNS/R ]*2 ]*2 INSPECT Information ABEND Breakpoint: Code Breakpoints: Data Breakpoints: Source System: STOP Breakpoint: NO 1 0 None NO Fields labelled with a “*1” are listed only for OSS programs. Fields marked with a “*2” are listed only for programs that use libraries. A program may use zero or more libraries.
Using Inspect With TNS/R Native Programs TRACE REGISTERS -PROG-SOURCE ICODE #3.1 #4 int global_1; #4.1 long global_2; #4.
Using Inspect With TNS/R Native Programs Examples Examples 1. Translating Machine Addresses into Procedure names Inspect can be used to convert machine level TNS/R code addresses into procedure names. The following example displays the RISC $PC register as TYPE LOCATION. The output indicates that the current value of the $PC register is at procedure #M statement 2, line number 34 in source file \SYS.$VOL.SUBVOL.FILE, and at hexadecimal offset F. -PROG-DISPLAY REGISTER $PC TYPE LOCATION REGISTER $PC = #M.
Examples Using Inspect With TNS/R Native Programs $VOL SUBVOL 61> RUND PROG INSPECT - Symbolic Debugger - T9673D40 - (29JUL03) System \SYS Copyright Tandem Computers Incorporated 1983, 1985-1995 INSPECT 175,09,00207 PROG #M.#33(FILE) ** Inspect warning 198 ** Results might be unexpected due to optimization. Executing command file $VOL.SUBVOL.INSPCSTM -PROG-SOURCE ICODE FOR 2 STATEMENTS *#33 Local^1 := Local^1 / 2; #33 00000000 LI t7,80 #33 00000000 LI t7,80 #28 - 00000004 ADDIU sp,sp,-64 #32.
Examples Using Inspect With TNS/R Native Programs -EPTAL2-INFO LOCATION * Scope: M Compile File: \SYS.$VOL.SUBVOL.FILE 1995-08-03 17:13:42.00 Byte Num Line Offset Optimize Verb 1 #28 %0 2 #32.1 %10 3 #33 %20 4 #34 %120 5 #36 %140 6 #38 %150 7 #38.1 %240 8 #40 %260 Modified: Statements #28, #32.1, and #36 have not been combined with neighboring statements. 3. Support of Register-based Variables The following source compiled at optimization 1, illustrates how Inspect supports register-based variables.
Using Inspect With TNS/R Native Programs Examples -PROG-INFO IDENTIFIER Param^1 PARAM^1: VARIABLE storage^info: TYPE=BIN SIGN, ELEMENT LEN=16 BITS, UNIT SIZE=1 ELEMENTS access^info: REGISTER 4 ($A0) -PROG-INFO IDENTIFIER Param^2 PARAM^2: VARIABLE storage^info: TYPE=BIN SIGN, ELEMENT LEN=16 BITS, UNIT SIZE=1 ELEMENTS access^info: REGISTER 5 ($A1)X The output above illustrates that parameter Param^1 is stored in register $4 or $A0 and that parameter Param^2 is stored in register $5 or $A1 and is indirect.
Using Inspect With TNS/R Native Programs -PROG-MODIFY SIGNAL SIGFPE Signal SIGFPE(8) Handler = SIG_DFL := SIG_DEBUG Mask = 0 0 0 0 := Flags = 0 := -PROG-INFO SIGNAL SIGFPE, DETAIL Signal:SIGFPE(8) Handler:SIG_DEBUG Mask:0 0 0 0 Flags:0 -PROG-RESUME INSPECT SIGNAL %10 - Entered debug due to non deferrable signal 241,00,00274 PROG #A.#26.001(FILE) + %H10I -PROG-TRACE Num Lang Location 0 TAL #A.#26.001(FILE) + %HFI 1 TAL #M.
Using Inspect With TNS/R Native Programs Inspect Manual—429164-006 17-18 Examples
18 Using Inspect on a TNS/E System Capabilities of Inspect on TNS/E Systems Acceleration on TNS/E Systems on page 18-2 Debugger Selection on TNS/E Systems on page 18-4 Using Inspect to Debug TNS Programs on TNS/E Systems on page 18-8 Capabilities of Inspect on TNS/E Systems What Inspect Does On a TNS/E system, you can use Inspect to debug the following: TNS processes emulated on a TNS/E system.
Acceleration on TNS/E Systems Using Inspect on a TNS/E System Acceleration on TNS/E Systems TNS program files that have been accelerated with the TNS Object Code Accelerator (OCA) run in TNS accelerated mode on TNS/E systems. If a TNS program file has not been accelerated, it will run in TNS interpreted mode. These two execution modes are further described in the following paragraphs.
Accelerating TNS Processes Using Inspect on a TNS/E System Accelerating TNS Processes Figure 18-1 illustrates acceleration on a TNS/E system by both the TNS Object Code Accelerator (OCA) and the TNS/R accelerator, Axcel. Figure 18-1.
Debugger Selection on TNS/E Systems Using Inspect on a TNS/E System Debugger Selection on TNS/E Systems Debugger selection is determined by the debugging attributes of a process. The rules for debugger selection differ according to system type (TNS/R or TNS/E). The rules followed on a TNS/R system are different from the rules on a TNS/E system. In addition, the TNS/R system debugger is Debug, but the system debugger on TNS/E systems is Native Inspect.
Debugger Selection on TNS/E Systems Using Inspect on a TNS/E System Debugger Selection Criteria In the flowcharts shown in both Figure 18-2 on page 18-6, and Figure 18-3 on page 18-7, debugger selection criteria are defined: Criteria Meaning INSPECT attribute on? The setting for the INSPECT attribute is set ON for the process you will debug (set with TACL, the compiler, or the linker). You have started Visual Inspect and have connected to the NonStop host on which the process to be debugged will run.
Debugger Selection on TNS/E Systems Using Inspect on a TNS/E System Figure 18-2 illustrates the debugger selection process for an emulated TNS process on a TNS/E system. Figure 18-2 demonstrates that to debug a TNS process on a TNS/E system, you can use either Visual Inspect (the preferred debugger) or Inspect. Note that Native Inspect can in some cases be selected as the debugger for a TNS process on TNS/E.
Debugger Selection on TNS/E Systems Using Inspect on a TNS/E System Figure 18-3 illustrates the debugger selection process for a native TNS/E program file on a TNS/E system. Note that to debug a TNS/E native process, you must use either Visual Inspect or Native Inspect; you cannot use Inspect to debug a TNS/E native process. In addition, only Inspect or Visual Inspect can be used to debug COBOL programs on a TNS/E system. Figure 18-3.
Using Inspect on a TNS/E System Using Inspect to Debug TNS Programs on TNS/E Systems Using Inspect to Debug TNS Programs on TNS/E Systems Debugging TNS programs on TNS/E systems is virtually the same as debugging TNS programs on TNS/R systems. The capabilities of Inspect are the same on the two platforms, except that a few Inspect commands have the limitations listed in Table 18-2.
A Error and Warning Messages Inspect scans command lists command by command and notifies you of an error or potential error by issuing an error or warning message: An error message indicates that Inspect could not execute the command. When Inspect generates an error message, it disregards the command that caused the error and any commands that followed it in the command list.
2 Error and Warning Messages 2 Unterminated continuation line While scanning for the remainder of a continuation line, a line following a line ending with a “&,” Inspect encountered the end-of-file. This generally occurs only when Inspect is reading commands from INSPLOCL, INSPCSTM, or an OBEY file. However, Inspect also generates this message if you press CTRL/Y when entering a continuation line. 3 Registers R0-R7 and E are not valid in the STOP state This is a warning.
8 Error and Warning Messages 8 Invalid file name file-name The given file name does not conform to syntax conventions. 9 Invalid Subvolume name A volume or subvolume name specified in the command list is too long (longer than eight characters), contains an invalid character, or specifies a volume that does not exist. 10 Invalid System name A system name specified in the command list is too long, contains an invalid character, or specifies a system that does not exist.
14 Error and Warning Messages 14 Invalid OBEY file - ignored The OBEY file specified in the command list is already in use as an input file or has a file code of 100. 15 Invalid LOG file - ignored The LOG file specified in the command list is already in use as an input file or as an OUT file. 16 Invalid RADIX value The SET RADIX command specified a radix other than DECIMAL, HEXADECIMAL, or OCTAL.
21 Error and Warning Messages 21 Invalid operation on saved program The current program is a save file, and the requested operation is not allowed on a save file. When examining save files, you can display data, but you cannot modify data or use execution control commands. 22 Invalid address An address specified in the command list is not a valid address in the current program. 23 All TNS registers are out of date This is a warning.
27 Error and Warning Messages 27 Invalid code address A code address specified in the command list is not a valid code address in the current program. 28 Request invalid in current state The requested operation is not valid given the execution state of the current program. For example, the MODIFY command is invalid when the current program is in the run state. 29 TCP internal error An internal error occurred on a TCP process.
33 Error and Warning Messages 33 Operation not supported for SCOBOL The requested operation is not supported for SCREEN COBOL programs. 34 Invalid operation on a NonStop I+ system The requested operation is not supported on a NonStop 1+ system. 35 Proc undefined: scope-unit Inspect could not find the specified scope unit in the current program. 36 No symbols available in scope: scope-unit The program file does not include symbols for the specified scope unit.
41 Error and Warning Messages 41 Inspect not enabled for process The process specified for debugging does not have the Inspect attribute set. 42 Required DMON not active The BREAK command specified the BACKUP clause, and the CPU executing the backup process has no active DMON process. Contact your system manager or system operator. 43 No backup process active The BREAK command included the BACKUP option, but the current program has no backup process.
47 Error and Warning Messages 47 Terminal must be a Guardian device The specified argument to the TERM command is not a Guardian device. 48 Requested file is not available file-name The file specified in the DELETE SOURCE OPEN command refers to a source file that is not open. Use the LIST SOURCE OPEN command to display the list of open source files. 49 Timestamp mismatch for file-name Following this warning, Inspect displays the current timestamp and the recorded timestamp.
52 Error and Warning Messages 52 Format data buffer overflow The DISPLAY FORMAT specified a format longer than 24 lines, which is the maximum that the FORMAT clause can display. 53 No such instance of procedure on stack: scope-unit The command list specified a nonexistent instance of the given scope unit. 54 No help available for topic There is no help information available for the given topic. 55 File is not a terminal A device other than a terminal was specified when a terminal was expected.
59 Error and Warning Messages 59 FORMATDATA conversion error: error-number The FORMATDATA procedure returned the reported error number. Refer to the manual for interpretation of the error number. 60 Expression evaluation error An expression that in the command list contained an unknown identifier or caused an overflow or type conflict. 61 Undefined variable: identifier Inspect could not find the specified identifier.
65 Error and Warning Messages 65 Not a disk file: file-name The specified file was expected to be a disk device. 66 Too many values for modify variable The specified target data location in the MODIFY command does not contain as many elements as are specified in the modify item list. Note that a subscript range may be specified on the data location, indicating which elements of an array are to be modified.
72 Error and Warning Messages 72 Inactive program unit reference may not contain offset For an inactive SCREEN COBOL program unit, Inspect will allow only references to scope names with no offset and no paragraph or section name attached. A breakpoint must be set at the beginning of the scope. When that breakpoint is reached, then breakpoints may be set at offsets within the program unit.
78 Error and Warning Messages 78 Invalid subscript value(s) for variable: identifier An identifier in a subscript expression is undefined or a specified lower bound is greater than a specified upper bound. 79 Subscript value outside of declared bounds: identifier The specified identifier was declared to have dimension bounds, but the subscript value specified is outside these bounds. 80 Required subscript missing: identifier The specified identifier was declared to be used with subscripts.
84 Error and Warning Messages 84 Incompatible TCP version: version-code The TCP process is an incompatible version code. The number printed is the version code. An Inspect version upgrade may be required. 85 Variable is local to inactive scope: identifier The specified variable is local to a scope unit which is not currently active. No instance of the scope unit appears in the call history. The TRACE command displays active scope units. 87 Maximum lines exceeded for format output A warning.
91 Error and Warning Messages 91 Incompatible Inspect version The DMON process has detected an incompatible version code. A DMON version upgrade may be required. 92 Display item is truncated A warning. The item being displayed has been truncated to 1014 bytes for the display. The WHOLE option may be used to display the entire item. 93 Specified location is a data address The requested display will show instructions, but you entered a data location instead of a code location.
98 Error and Warning Messages 98 Qualification required to resolve ambiguous reference: identifier The specified identifier must be qualified further to distinguish it from other identifiers of the same name. 99 Access is local (sublocal reference must be qualified): identifier A warning. The specified TAL variable is declared as a local in the current procedure and as a sublocal in the current subprocedure. The local variable is used.
103 Error and Warning Messages 103 Modify string must be provided The MODIFY command with a WHOLE option may not be interactive. The modification string must be included in the command. 104 TCP backup takeover. reentered. All requestor breakpoints must be The TCP process for the current PATHWAY requester program has stopped and its backup has taken over. All breakpoints in the program have been lost and must be reset. 105 DMON communication lost.
109 Error and Warning Messages 109 Non-numeric character in numeric string A warning. A numeric string variable being displayed contains nonnumeric characters. The displayed value is probably incorrect. 111 Scope undefined: scope-unit Inspect does not recognize the specified scope at the current location in the program. For programs that are not SCREEN COBOL programs, you can use the MATCH SCOPE command to list the scope names that match a given pattern.
117 Error and Warning Messages 117 A subsequent line number is assumed: line-number A warning. A line number specified as a code-location or data-location in a command had no executable statement associated with it. The next executable statement begins at line number line-number. 118 Line number is not recognized, try specifying source file also: line-number Inspect does not recognize the given line number for one of these reasons: 1. It is less than the first line number defined in the scope unit. 2.
123 Error and Warning Messages 123 Unexpected frame data was encountered; stack is probably corrupt Inspect displays this warning message when you enter a TRACE command and Inspect detects that a stack marker contains an impossible L register. Inspect can detect when a stack is corrupt in a TNS program. 124 Line no longer exists: line-number Inspect displays this message when you make a reference to a nonexistent line number.
128 Error and Warning Messages 128 Maximum table size exceeded. Table size truncated. In low-level Inspect, a display command using the table format exceeded the maximum table size for the Inspect message buffer. Inspect truncated the table to the maximum size. 129 New object file format, symbols cannot be accessed. The symbols cannot be accessed because Inspect detected an inconsistency in the Inspect region of the object file.
133 Error and Warning Messages 133 Location is in an inactive user library If you specify a user library to use, as in SELECT PROGRAM, and the program does not have a user library, subsequent commands will be rejected with the above error if they involve locations from the new user library. 134 Location not contained in valid code block This error is reported when Inspect attempts to look up a procedure name and finds that BINDER information has been stripped from the object file.
140 Error and Warning Messages 140 Incompatible run-time environment. Environment is mode This warning is reported when the environment mode in a program block is not compatible with the current runtime environment. mode is one of NEUTRAL, COMMON, HISTORIC, or UNKNOWN. 141 Common Run-time error number This error is reported when Inspect detects a common runtime environment error.
146 Error and Warning Messages 146 ACCESS is not allowed with READ or WRITE This error is reported when you enter a break command with an illegal combination of data breakpoint types. ACCESS specifies a break event should occur on read access, in addition to write access of the data item. 169 Following value was invalid for enumerated type An attempt was made to display an enumerated type that contains a value for which there is no corresponding enumeration.
174 Error and Warning Messages 174 Source assign name must include a volume name The original and new names you use in an ADD SOURCE ASSIGN command must include a volume name. 176 Source assign original name and current name must have the same qualification The original name and new name you use in an ADD SOURCE ASSIGN command must both be qualified to the same level. If the original name is a volume, the new name must be a volume; if the original name is a subvolume, the new name must be a subvolume.
185 Error and Warning Messages 185 Unable to trace subproc(s) due to 'S' register modification Inspect cannot display all subprocedures entries in the call history because the program has an unexpected S register value. The stack markers that link subprocedure calls are addresses relative to the S register. If the program modifies the S register, Inspect cannot locate subprocedures stack markers. 188 SSGET: error-specification The SSGET system procedure returned the reported error number.
194 Error and Warning Messages markers that link subprocedure calls are addressed relative to the S register. If the program modifies the S register, Inspect cannot locate the subprocedure stack marker. To step out of a subprocedure, set a temporary breakpoint on the statement following the subprocedure call and issue a RESUME command. To step out of a containing procedure, issue a STEP OUT PROC command.
198 Error and Warning Messages 198 Results might be unexpected due to optimization. If optimization across statements was performed, the instructions for statements are sometimes merged. Therefore, some Inspect operations (for example, MODIFY) might not produce the expected results. 199 System is unavailable The system is unavailable because all network paths to it are down. 201 No programs exist The LIST PROGRAM command found no programs on the program list for the current session.
205 Error and Warning Messages 205 History buffer is empty The FC, XC, or LIST HISTORY command found the history buffer empty. 206 Command number not found The FC, XC, or LIST HISTORY command specified a command number that is no longer in the history buffer. 207 Call history ordinal exceeds the number of calls The command list specified a scope number greater than the number of calls in the call history. The TRACE command lists legal scope ordinals.
212 Error and Warning Messages 212 Breakpoint not found The CLEAR, FB (fix breakpoint), or LIST BREAKPOINT command specified a breakpoint that is not defined in the current program. 213 Alias not found The LIST ALIAS or DELETE ALIAS command specified an alias name that is not defined in the current session. 214 Alias table empty The LIST ALIAS or DELETE ALIAS command found no aliases defined in the current session.
219 Error and Warning Messages STEP STOP 219 Command reserved for interactive users The command list, which Inspect read from an OBEY file, INSPLOCL, or INSPCSTM, included a command that can only be used interactively. 220 Type too large for register The DISPLAY REGISTER command specified a display type that requires more data than a register contains. 221 Previous assign for original name replaced The ADD SOURCE ASSIGN command specified an original name that already had an assignment.
228 Error and Warning Messages 228 Ordinal statement-number is less than 1, not a valid ordinal The command list specified a statement number less than one. 229 Ordinal statement-number exceeds the number of statements in the scope The command list specified a statement number beyond the last statement in the scope unit. 231 Too many items in STATUS list The SET STATUS LINE25 or SET STATUS SCROLL command specified too many status items.
235 Error and Warning Messages 235 File position range (F or L) not allowed The SOURCE ICODE command specified a range using the F (first line) or the L (last line) position option. These options cannot be used with SOURCE ICODE. 237 SPI FORMATTING ERROR: error The SPI_BUFFER_FORMATSTART_, SPI_BUFFER_FORMATNEXT_, or SPI_BUFFER_FORMATFINISH_ system procedure returned the reported error number.
253 Error and Warning Messages 253 Search pattern required A search string was not specified with the SOURCE SEARCH command. 254 Search clause already specified A parameter or clause was specified more than once with the SOURCE SEARCH command. 259 File already exists: file-name This error is reported when the file specified with the SAVE command already exists. If you want to overwrite the file, specify a “!” following the file name.
276 Error and Warning Messages 276 Expression items must be element level: expression This error is reported when a structure or record variable is used in an expression and an element was not specified. 278 Current language might change at the next event You will receive this warning if you use SET LANGUAGE instead of SELECT LANGUAGE.
294 Error and Warning Messages 294 Unable to convert the expression to the type of the variable being modified The requested operation required a conversion between incompatible types. 295 A file number must be an integer expression The requested operation required a conversion between incompatible types. For example, a file number must be a positive integer value and Inspect was unable to convert the entered expression into a integer value.
300 Error and Warning Messages 300 Unable to traverse subprocedure calls Inspect was unable to find a value on the data stack that matched a subprocedure's return address. This could be due to a program’s manipulation of the “S” register within a subprocedure. 301 Segment number maximum is 32767 The number specified in the command exceeded the allowed range. Segment numbers must be positive, signed 16-bit numbers.
306 Error and Warning Messages 306 [ACCESS/CHANGE/WRITE] is not allowed with a code location You attempted to set a breakpoint on a code location when the break event specified is not allowed, that is, ACCESS, CHANGE, or WRITE on a code breakpoint. 307 Internal Frame Error DMON and Inspect encountered an error attempting to retrieve stack frames. You cannot access data from frames other than the current location frame. Use the SELECT DEBUGGER DEBUG command followed by TN as an alternative.
354 Error and Warning Messages 354 The values in registers R0-R7 and E are out of date This warning is reported for accelerated programs when TNS registers are displayed and the current location is not a register-exact point. TNS register values are only guaranteed to be accurate at register-exact points.
359 Error and Warning Messages Inspect cannot predict when a modify operation may have no effect. Chances are highest when you are modifying a variable that has been used recently or is about to be used. 359 Current location is not a memory-exact point; displayed values may be out of date; the location reported is an approximate TNS location This warning is reported for accelerated programs when Inspect reports a debugging event and the current location is not a memory-exact point.
363 Error and Warning Messages 363 Variable is larger than 16-bits in size breakpoint is set on the first 16-bit word This warning is reported if you set a data breakpoint on a variable that is larger than 16 bits in size. In this case, the breakpoint can only be set on the first word of memory that the variable occupies. 364 Value of variable did not change; breakpoint may have been triggered by an access to the containing 16-bit word This warning is only reported for write memory access breakpoints.
368 Error and Warning Messages the capacity of a file. Segments are saved in the order that they were allocated, so, in this case, data for segments allocated later may not be available. 368 The current program is not a save file The command that was issued can only be used when the current program is a save file. 369 The RP clause cannot be used with an accelerated program This error is reported for accelerated programs if you attempt to use the RP clause with the RESUME AT command.
374 Error and Warning Messages specified to list the correspondence between TNS and TNS/R instructions. It can also occur when listing TNS instructions given a TNS/R address or listing TNS/R instructions given a TNS address.
379 Error and Warning Messages 379 The following was formatted for display when an error was encountered This warning is reported by the DISPLAY command if an error occurred while formatting data to be displayed. In such a case, any values that were formatted before the error occurred are displayed. 380 Recursive alias definition This warning is reported if you attempt to define an alias that calls itself.
384 Error and Warning Messages 384 Low-level breakpoints not allowed with FB or AS COMMANDS This error is reported if an attempt is made to use the FB command or the AS COMMANDS clause with breakpoints that were set from low-level Inspect. 385 Object file file does not contain accelerator information This warning is reported by the ADD PROGRAM command when a save file for an accelerated program is added and the file specified with the CODE clause does not contain accelerator information.
389 Error and Warning Messages 389 Address is not aligned to a TNS/R instruction boundary it will be rounded down to the previous instruction This warning is reported for accelerated programs if the specified TNS/R address is not 32-bit word aligned.
394 Error and Warning Messages 394 Non-existent program object file: file This error is reported when using the ADD PROGRAM command to add a save file and the program file specified in the save file cannot be found. You must use the CODE clause of the ADD PROGRAM command to specify where the object file can be found. 395 Non-existent library object file: file This error is reported when using the ADD PROGRAM command to add a save file and the user library file specified in the save file cannot be found.
450 Error and Warning Messages 450 This snapshot file contains dynamic link library information. Visual Inspect is required. This error message is reported when the user enters an ADD PROGRAM command and attempts to open a snapshot file that contains DLL information. Inspect does not support the debugging of DLLs. You must use either Visual Inspect or Debug on TNS/R systems. On TNS/E systems, use either Visual Inspect or Native Inspect. 1003 Process name cpu,pin is a TNS/E process.
1007 Error and Warning Messages 1007 Inspect cannot read a TNS/E object file. A command such as INFO SAVEFILE was entered, specifying a TNS/E object file. To debug TNS/E native object files, use either Visual Inspect or Native Inspect. 1008 BACKUP option is not supported on TNS/E. The BREAK command was specified with the BACKUP option to debug a backup process. On TNS/E, the backup process is not owned by the debugger when the user tries to set the backup breakpoint.
B Syntax Summary High Level Inspect Commands Language-Dependent Parameters for C on page B-22 Language-Dependent Parameters for C++ on page B-23 Language-Dependent Parameters for COBOL and SCREEN COBOL on page B-25 Language-Dependent Parameters for FORTRAN on page B-27 Language-Dependent Parameters for Pascal on page B-29 Language-Dependent Parameters for TAL and pTAL on page B-31 Low-Level Inspect Commands on page B-33 High Level Inspect Commands The syntax of the four following high-leve
ALIAS Syntax Summary program-spec: one of process save-file [ CODE code-file ] [ LIB lib-file ] [ SRL {( srl-file [ , srl-file,...])}] original-name: one of [ \system. ] $volume [ .subvolume [ .file ] ] [ \system. ] $process [ .#qual-1 [ .qual-2 ] ] [ \system. ] cpu, pin [ \system. ] $volume.#number /oss-pathname [/oss-pathname...] new-name: either of [\system.] $volume [ .subvolume [ .file ] ] /oss-pathname [/oss-pathname...
CD Syntax Summary data-subtype: one of ACCESS CHANGE READ WRITE READ WRITE brk-action: one of TEMP [ integer ] THEN { command-string | alias-name } CD CD { oss-pathname } CLEAR CLEAR { * | clear-spec } clear-spec: one of breakpoint-number [ , breakpoint-number ] CODE code-location [ , code-location ] DATA data-location [ , data-location ] EVENT { ABEND | STOP } COMMENT COMMENT | -- [ text ] DELETE DELETE list-item list-item: one of ALIAS[ES] { * | alias-name } KEY[S] { * | key-name } SOURCE ASSIG
DISPLAY Syntax Summary [ \system. ] $volume.#number /oss-pathname [/oss-pathname...] DISPLAY DISPLAY item [ , item ]...
DISPLAY Syntax Summary [ scope-path ] code-reference code-reference: one of scope-unit label #line-number for-count: one of non-negative integer data-location register-item: one of ALL BOTH TNS TNS/R register-name register-name: one of tns-register-name tns/r-register tns-register-name: one of P E L S R0 R1 R2 R3 R4 R5 R6 R7 RA RB RC RD RE RF RG RH tns/r-register: one of $PC $H1 $LO $0 $1...
DISPLAY Syntax Summary spi-type: one of EMS EMS-NUM SPI SPI-NUM spi-token: data-address : token-spec [ TYPE spi-type ] [ POSITION token-spec [ , token-spec ]... ] token-spec: token-code [ : token-index ] [ SSID ssid-string ] token-code: one of token-index ssid-string value-list: one of integer integer , integer integer , integer , integer , integer formatting-clause: one of IN base [ base ]... { FORMAT | FMT } format-list PIC mask-string [ , mask-string ]...
ENV Syntax Summary ENV ENV [ env-parameter ] env-parameter: one of DIRECTORY LANGUAGE LOG PROGRAM SCOPE SOURCE SYSTEM SYSTEM SYSTYPE VOLUME EXIT EXIT FA FA alias-name FB FB breakpoint-number FC FC [ command-line-specifier ] command-line-specifier: one of pos-num neg-num search-text " search-text" FILES FILES [ { * | file-list > } [ DETAIL ] [ file-type ] Inspect Manual—429164-006 B-7
FK Syntax Summary file-list: file-number [, file-number ] file-type: FORTRAN FD GUARDIAN FK FK key-name key-name: one of F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 F16 SF1 SF2 SF3 SF4 SF5 SF6 SF7 SF8 SF9 SF10 SF11 SF12 SF13 SF14 SF15 SF16 HELP HELP [ topic ] topic: main-topic [ sub-topic [ sub-topic ] ] HISTORY HISTORY [ num ] num HOLD HOLD [ program [ , program ]...
ICODE Syntax Summary ICODE ICODE location [ FOR count [ unit ] ] [ report ] location: one of [ AT code-location ] [ tns/r tns/r-address-expression ] [ tns-address-expression ] [ UC.number | UL.number ] unit: one of INSTRUCTION[S] STATEMENT[S] VERB[S] report: one of TNS tns/r BOTH tns/r: one of TNSR TNS/R R tns/r-address-expression: tns/r-value [ operator tns/r-value ]... tns-address-expression: tns-value [ operator tns-value ]...
IDENTIFIER Syntax Summary IDENTIFIER IDENTIFIER { * | identifier-spec } identifier-spec: one of [ scope-path. ] identifier [ .identifier ]...
KEY Syntax Summary KEY KEY[S] [ key-name [ [=] replacement-string ] ] key-name: one of F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 F16 SF1 SF2 SF3 SF4 SF5 SF6 SF7 SF8 SF9 SF10 SF11 SF12 SF13 SF14 SF15 SF16 LIST LIST list-spec [ AS COMMAND[S] ] list-spec: one of ALIAS[ES] [ alias-name ] BREAKPOINT[S] [ breakpoint-number ] HISTORY [ command-range ] KEY[S] [ key-name ] PROGRAM[S] [ program ] SOURCE ASSIGN[S] SOURCE OPEN[S] options: one of [ [ , ] DETAIL ] | [ AS COMMAND[S] ] key-name: one of F1 F2 F3
LOW Syntax Summary LOW LOW MATCH MATCH { SCOPE pattern } { IDENTIFIER pattern [[,] SCOPE scope-spec |[,VERBOSE]]} scope-spec: one of scope-number scope-path Inspect Manual—429164-006 B-12
MODIFY Syntax Summary MODIFY MODIFY { data-location [ WHOLE ] [ { = | := } mod-list ] } { REGISTER register-name [ { = | := } expression ] } { SIGNAL signal-id [ { = | := } signal-list ] } mod-list: mod-item [ , mod-item ]... mod-item: [ integer COPIES ] expression register-name: one of tns-register-name tns/r-register tns-register-name: one of P E L S R0 R1 R2 R3 R4 R5 R6 R7 RA RB RC RD RE RF RG RH tns/r-register: one of $PC $H1 $LO $0 $1...
OBEY Syntax Summary OBEY OBEY file-name OBJECT OBJECT OPENS OPENS [ { * | file-list } [ DETAIL ] [ file-type ] ] file-list: file-number [, file-number ] file-type: one of FORTRAN FD GUARDIAN OUT { OUT file-name } { /OUT file-name/ } PAUSE PAUSE PROGRAM PROGRAM[S] [ program [ CODE file-name ] [ LIB lib-file ] [ SRL {( srl-file [ , srl-file,...
RESUME Syntax Summary RESUME RESUME [ * [ EXIT ] ] [ program [ AT code-location [ , RP integer ] ] ] program: one of program-number program-name cpu, pin Pathway-terminal-name SAVE SAVE filename [ ! ] SCOPE SCOPE [ scope-spec ] scope-spec: one of scope-number scope-path [ ( instance) ] #data-block ##GLOBAL Inspect Manual—429164-006 B-15
SELECT Syntax Summary SELECT SELECT select-option select-option: one of DEBUGGER DEBUG SEGMENT [ segment id ] LANGUAGE language PROGRAM program [ CODE file-name ] [ LIB file-name ] [ SRL {( srl-file [ , srl-file,...
SET Syntax Summary SET SET set-assignment set-assignment: one of CHARACTER FORMAT [=] { ASCII | GRAPHICS | XASCII } DEREFERENCE DEPTH [=] integer ECHO echo-item [=] { ON | OFF } LOCATION FORMAT [ level ] [=] loc-fmt [, loc-fmt ]... PRIV MODE [=] { ON | OFF } PROMPT [=] [ prompt-item [ , prompt-item ]...
SET Syntax Summary PROGRAM PID RADIX SOURCE STEP SUBVOL[UME] SYSTEM SYSTYPE VOLUME radix: one of DEC[IMAL] HEX[ADECIMAL] OCT[AL] count: integer [ STATEMENT[S] | LINE[S] | INSTRUCTION[S] ] range: one of F L #line-number statement-number status-item-list: status-item [ , status-item ]...
SHOW Syntax Summary SHOW SHOW { ALL [ AS COMMAND[S] ] } { set-object } set-object: one of CHARACTER FORMAT [=] { ASCII | GRAPHICS | XASCII } DEREFERENCE DEPTH integer ECHO { ALL | ALIAS[ES] | HISTORY | KEYS } LOCATION FORMAT [ level ] PRIV MODE [=] ON | OFF PROMPT RADIX [ INPUT | OUTPUT ] [ level ] SOURCE { ALL | BACK | FOR | RANGE | WRAP } STATUS { ALL | ACTION | LINE25 | SCROLL } [ level ] SUBPROC SCOPING [=] [ SUBLOCAL | LOCAL ] TRACE { ALL | ARGUMENT[S] | SCOPE[S] | STATEMENT[S] } level: one of BOTH H
SOURCE Syntax Summary SOURCE SOURCE [ source-locator ] [ limit-spec ]... [ file-locator ] [ WRAP ] source-locator: one of AT code-location ICODE [ AT code-location ] [ LINE ] #line-number [ STATEMENT ] statement-number SEARCH string [ CASE ] [ position /position ] limit-spec: one of FOR count [ STATEMENT[S] | LINE[S] | INSTRUCTION[S] ] BACK count [ STATEMENT[S] | LINE[S] | INSTRUCTION[S] ] /position position: one of F L #line-number statement-number string: one of " [ character ]... " ' [ character ]...
STOP Syntax Summary STOP STOP [ * | program ] program: one of program-number program-name cpu,pin SYSTEM SYSTEM [ \system ] TERM TERM { terminal | process } process: [ \system. ] $name TIME TIME [ /OUT/ ] TRACE TRACE [ num-calls ] [ REGISTERS ] [ ARGUMENTS ] VOLUME VOLUME { $volume } { [ $volume.
Language-Dependent Parameters for C Syntax Summary Language-Dependent Parameters for C C Scope Paths scope-path: #function C Code Locations code-location: { scope-path } [ FROM module°] [ offset°]... { [ scope-path.] code-spec } code-spec: one of function label statement-number #line-number [ ( source-file) ] offset: { + | - } num [ code-unit ] code-unit: one of INSTRUCTION[S] STATEMENT[S] VERB[S] C Data Locations data-location: [ scope-path [ ( instance) ] . ] data-reference [ #data-block.
C Expressions Syntax Summary C Expressions expression: one of primary *expression &expression -expression !expression ~expression expression binary-op expression primary: one of data-location constant string ( expression ) binary-op: one of * / % + - >> << < > <= >= == != & ^ | && || Language-Dependent Parameters for C++ C++ Scope Paths scope-path: #function Inspect Manual—429164-006 B-23
C++ Code Locations Syntax Summary C++ Code Locations code-location: { scope-path } [ FROM module°] [ offset°]... { [ scope-path.] code-spec } code-spec: one of function label statement-number #line-number [ ( source-file) ] offset: { + | - } num [ code-unit ] code-unit: one of INSTRUCTION[S] STATEMENT[S] VERB[S] C ++ Data Locations data-location: [ scope-path [ ( instance) ] . ] data-reference [ #data-block.
C++ Expressions Syntax Summary C++ Expressions expression: one of primary *expression &expression -expression !expression ~expression expression binary-op expression primary: one of data-location constant string ( expression ) binary-op: one of * / % + - >> << < > <= >= == != & ^ | && || Language-Dependent Parameters for COBOL and SCREEN COBOL COBOL 74 and SCOBOL Scope Paths scope-path: #program-unit COBOL85 Scope Paths scope-path: #program-unit [ .program-unit ]...
COBOL Code Locations Syntax Summary COBOL Code Locations code-location: { scope-path } [ offset ]... { [ scope-path.] code-spec } code-spec: one of program-unit section paragraph [ OF section ] statement-number #line-number [ ( source-file) ] offset: { + | - } num [ code-unit ] code-unit: one of INSTRUCTION[S] STATEMENT[S] VERB[S] COBOL Data Locations data-location: [ scope-path. ] data-reference data-reference: identifier [OF identifier ]... [ ( index [ , index ]...
COBOL Expressions Syntax Summary COBOL Expressions expression: condition [ { AND | OR } condition ]... condition: [ NOT ] { simple-exp [ rel-op simple-exp ]... } { level-88-condition } rel-op: [ NOT ] { > = < GREATER EQUAL LESS } simple-exp: [ + | - ] term [ { + | - } term ]... term: factor [ { * | / } factor ]...
FORTRAN Code Locations Syntax Summary FORTRAN Code Locations code-location: { scope-path } [ offset ]... { [ scope-path.] code-spec } code-spec: one of scope-unit statement-function statement-label entry-point statement-number #line-number [ ( source-file) ] offset: { + | - } num [ code-unit ] code-unit: one of INSTRUCTION[S] STATEMENT[S] VERB[S] FORTRAN Data Locations data-location: [ scope-path [ ( instance) ] .
FORTRAN Expressions Syntax Summary FORTRAN Expressions expression: condition [ bool-op condition ]... bool-op: one of .AND. .OR. .EQV. .NEQV. condition: [ .NOT. ] simple-exp [ rel-op simple-exp ] rel-op: one of .LT. .LE. .GT. .GE. .EQ. .NE. simple-exp: [ + | - ] term [ { + | - } term ]... term: factor [ { * | / } factor ]... factor: primary [ **primary ] primary: one of data-location constant ( expression ) Language-Dependent Parameters for Pascal Pascal Scope Paths scope-path: #scope-unit [ .
Pascal Code Locations Syntax Summary Pascal Code Locations code-location: { scope-path } [ FROM module°] [ offset°]... { [ scope-path.] code-spec } code-spec: one of scope-unit label statement-number #line-number [ ( source-file) ] offset: { + | - } num [ code-unit ] code-unit: one of INSTRUCTION[S] STATEMENT[S] VERB[S] Pascal Data Locations data-location: [ scope-path [ ( instance) ] . ] data-reference [ #data-block.
Pascal Expressions Syntax Summary Pascal Expressions expression: simple-exp [ rel-op simple-exp ]... rel-op: one of = <> < > <= >= simple-exp: [ + | - ] term [ add-op term ]... add-op: one of + - OR term: factor [ mult-op factor ]...
TAL and pTAL Code Locations Syntax Summary TAL and pTAL Code Locations code-location: { scope-path } [ code-offset ] { [ scope-path. ] code-reference } code-reference: one of procedure subproc [ subproc. ] label [ subproc. ] entry-point statement-number #line-number [ ( source-file) ] code-offset: { + | - } num [ code-unit ] code-unit: one of INSTRUCTION[S] STATEMENT[S] TAL and pTAL Data Locations data-location: [ scope-path [ ( instance) ] . ] [[ scope-path. ] subproc [ ( instance) ].
TAL and pTAL Expressions Syntax Summary TAL and pTAL Expressions expression: condition [ { AND | OR } condition ]... condition: [ NOT ] simple-exp [ rel-op simple-exp ]... rel-op: one of < <= = >= > <> '<' '<=' '=' '>=' '>' '<>' simple-exp: [ + | - ] term [ add-op term ]... add-op: one of + - '+' '-' LOR LAND XOR term: factor [ mult-op factor ]... mult-op: one of * / '*' '/' '\' << >> '<<' '>>' factor: one of primary primary. primary: one of data-location .
A Syntax Summary The following low-level Inspect command parameters are described after the low-level commands themselves: address code-address data-address expr A A address [ , { count | T entry-size*entry-count } ] count: expr B B [ code-address [ , data-address test-op expr ] ] test-op: one of = < > <> ? BM BM address , type [ , data-address test-op expr ] test-op: one of = < > <> ? type: one of R W RW C C [ code-address ] CM CM Inspect Manual—429164-006 B-34
D Syntax Summary D D [ [ unit ] address [ ,amount ] ] [ :base ] [ register ] unit: one of B W D F amount: one of num T width * height base: one of A B D H I O X # register: one of P E L S R0 R1 R2 R3 R4 R5 R6 R7 RA RB RC RD RE RF RG RH F F [ expr ] FN FN [ address [ ,value ] [ &mask ] ] HIGH HIGH I I address [ ,amount ] amount: one of num T width * height Inspect Manual—429164-006 B-35
M Syntax Summary M M { register | data-address } [ ,expr ]... register: one of P E L S R0 R1 R2 R3 R4 R5 R6 R7 RA RB RC RD RE RF RG RH P P expr R R S S T T [ data-address ] VQ VQ segment-id = = expr [ : display-type ] display-type: one of A B D H O X # C E I UC [ .space-id ] UL [ .
Low-Level Addresses Syntax Summary Low-Level Addresses address: one of code-address data-address Low-Level Code Addresses code-address: [ base-mode ] expr base-mode: one of C UC [ .space-id ] UL [ .
Low-Level Expressions Syntax Summary Low-Level Expressions expr: value [ operator value ]... operator: one of * / << >> + value: one of ( expression ) 'ASCII-character ASCII-character #code-block #data-block number [ .
C Notes for System Operators Starting the IMON Process Pair Stopping IMON and DMON Processes on page C-2 IMON and DMON Errors on page C-3 Starting the IMON Process Pair You should start the IMON process pair as part of your standard system startup procedure. Start $IMON using the command interpreter RUN command. Note. IMON contains privileged procedures and consequently must be owned by the super id (255,255).
Usage Considerations Notes for System Operators If you do not specify a backup processor, the primary IMON process selects a processor for the backup process using these guidelines: IMON regards the system as a group of even-odd processor pairs (0,1), (2,3), and so on. If the primary IMON process is running in one processor of such a pair, the backup IMON process will be run in the other member of the pair.
IMON and DMON Errors Notes for System Operators IMON and DMON Errors Errors occurring during IMON startup are displayed on the home terminal. Internal IMON and DMON errors that occur during operation are reported on the operator console. Errors related to a user processes are sent to the process's home terminal.
IMON Errors Notes for System Operators IMON will print this out when the procedure PROCESS_GETINFO_ returns an error. Wrong Guardian version You tried to run the program with an incompatible version of the operating system. DMON in CPU nn marked down by $IMON This message is reported when DMON repeatedly ABENDs or STOPs. IMON will mark it as down, and will not attempt to restart it. IMON must be re-started to mark this DMON up again.
DMON Errors Notes for System Operators DMON Errors The following errors are reported by DMON. Initialization of Guardian event reporting failed This error is reported at DMON start up time if, for some reason, the initialization of the operating system mechanism that reports debugging events to DMON failed. IMON ($IMON) does not exist This error is reported if DMON receives a debugging event and no IMON process exists.
DMON Errors Notes for System Operators stopping the process. This error is reported if the STOP operation fails). When this event occurs, the process still exists. ALLOCATESEGEMENT failed: Volume volume, Error error This error is reported when DMON begins execution if its attempt to allocate an extended data segment fails. Incompatible GUARDIAN version User tried to run DMON on a incompatible version of the operating system. SAFEGUARD error nnn on $ZSMP, save file might retain SUPER.
Glossary accelerate. To speed up emulated execution of a TNS object file by applying either the Axcel accelerator for TNS/R system execution or the Object Code Accelerator (OCA) for TNS/E system execution before running the object file. accelerated mode. See TNS accelerated mode. accelerated object code.
Break event Glossary Break event. The type of debug event that occurs when a breakpoint causes a program's execution to halt. Break location. The part of a breakpoint's definition that specifies where the breakpoint is located. Breakpoint. A location (or point) in a program where execution is to be suspended so that you can then examine and perhaps modify the program’s state. You can set and clear breakpoints with Inspect commands.
Command list Glossary Command list. A list of one or more Inspect commands, separated by semicolons. Command mode. An operating mode of Inspect that defines the type of access you have to your program. The low-level command mode provides machine-level access, and high-level command mode provides source-level access. Command terminal. A terminal at which system managers, developers, and programmers interact with system-level utility programs. Common Run-Time Environment (CRE).
data block Glossary data block. A collection of static data items that BINDER can relocate separately from the rest of a program's static data. Dynamic data items (local variables, file buffers, and so on) are not part of any data block. data breakpoint. A breakpoint set at a data location. data location. A specific location within a program's static or dynamic data area. Inspect lets you define data locations using source-language symbols and identifiers. Debug event.
expression Glossary expression. A list of operands and operators which, when evaluated, results in a number or a string. gone state. A state where the program has been stopped, but the program will not be cleared from the list until DMON sends a message back. When the program is in this state it is possible to catch it before it actually stops. G-series system. .An HP NonStop system that is running a G-series version of the operating system. Guardian.
Inspect process Glossary Inspect process. The terminal process that enables you to debug programs distributed across several DMONs and TCPs. In addition, the Inspect process enables Inspect to access symbol information and source code for programs written in all languages. Inspect prompt. The prompt that Inspect displays when awaiting your command. See Prompting for Commands on page 2-3. Inspect region.
linkfile Glossary Binder links TNS object files on TNS/R systems. nld links TNS/R native object files to create a linkfile or a loadfile. ld, the PIC (Position-Independent Code) linker, links TNS/R PIC object files to create a PIC executable, which can be either a program file or a dynamic-link library (DLL). eld, the TNS/E linker, links TNS/E object files to a PIC executable, which can be either a program file or a dynamic-link library (DLL). linkfile.
MIPS RISC word Glossary on a TNS/R system. The accelerator creates this region and writes it into the TNS object file. Contrast with Intel Itanium instruction region. MIPS RISC word. An instruction-set-defined unit of memory. A MIPS RISC word is 4 bytes (32 bits) wide, beginning on any 4-byte boundary in memory. Contrast with TNS word and word. See also Intel Itanium word. native. An adjective that can modify object code, object file, process, procedure, and mode of process execution.
OCA Glossary OCA. (1) The command used to invoke the TNS Object Code Accelerator (OCA) on a TNS/E system. (2) See TNS Object Code Accelerator (OCA). OCA region loading. A task performed when necessary by the TNS emulation software for TNS/E machines. This task involves mapping into memory the Intel Itanium instructions and any tables needed at run time from the OCA-generated object file. OCA region of an object file.
parameter Glossary parameter. An item you specify in an Inspect command. Parameters always appear in italic print in the manual. pathname. The string of characters that uniquely identifies a file within its file system. A pathname can be either relative or absolute. See also ISO/IEC IS 9945-1:1990 (ANSI/IEEE Std. 1003.1-1990 or POSIX.1), Clause 2.2.2.57. PATHWAY requester program. A SCREEN COBOL program running under the supervision of a TCP.
process identification number (PIN) Glossary process identification number (PIN). An unsigned integer that identifies a process in a processor module. process snapshot file. (1) A file containing dump information needed by the system debugging tool. In UNIX systems, such files are usually called core files or core dump files. (2) A file containing the state of a running process at a specific moment, regardless of whether the process terminated abnormally. See also saveabend file. program.
RISC processor Glossary RISC processor. An instruction processing unit (IPU) that is based on reduced instruction-set computing (RISC) architecture. TNS/R systems contain RISC processors. run state. The execution state describing a program while it is running. save file. A file created by the Inspect subsystem in response to a command from a debugger. A save file contains enough information about a running process at a given time to restart the process at the same point in its execution.
signal handler Glossary output has occurred. See also OSS signal, TNS signal, TNS/R native signal, and TNS/E native signal. signal handler. A procedure that is executed when a signal is received by a process. snapshot. An image of the process, its data, and its status at the moment it was saved. In Inspect, a snapshot, referred to as a save file, is created using the SAVE command. In Visual Inspect, a snapshot is created using the Save Snapshot command.
TNS accelerated mode Glossary TNS accelerated mode. A TNS emulation environment on a TNS/R or TNS/E system in which accelerated TNS object files are run. TNS instructions have been previously translated into optimized sequences of MIPS or Intel Itanium instructions. TNS accelerated mode runs much faster than TNS interpreted mode. Accelerated or interpreted TNS object code cannot be mixed with or called by native mode object code. See also Accelerator and TNS Object Code Accelerator (OCA).
TNS instructions Glossary (XEP) table and patching PCAL and XCAL instructions in a TNS object file before loading the file into memory. See also TNS mode. TNS instructions. Stack-oriented, 16-bit machine instructions that are directly executed on TNS systems by hardware and microcode. TNS instructions can be emulated on TNS/E and TNS/R systems by using millicode, an interpreter, and acceleration. Contrast with Intel® Itanium® instructions and RISC instructions. TNS interpreted mode.
TNS procedure label Glossary TNS procedure label. A 16-bit identifier for an internal or external procedure used by the TNS object code of a TNS process. The most-significant 7 bits are a TNS code segment identifier: 2 bits for the TNS code space and 5 bits for the TNS code segment index. The least-significant 9 bits are an index into the target segment's procedure entry-point (PEP) table. On a TNS/E system, all shells for calling native library procedures are segregated within the system code space.
TNS word Glossary TNS word. An instruction-set-defined unit of memory. A TNS word is 2 bytes (16 bits) wide, beginning on any 2-byte boundary in memory. See also Intel Itanium word, MIPS RISC word, and word. TNS/E. Refers to fault-tolerant HP computers that support the HP NonStop operating system and are based on the Intel Itanium processor. TNS/E systems run the Itanium instruction set and can run TNS object files by interpretation or after acceleration.
TNS/R library Glossary interpretation or after acceleration. TNS/R systems include all HP systems that use NSR-x processors. Contrast with TNS and TNS/E. TNS/R library. A TNS/R native-mode library. For a PIC-compiled application, TNS/R libraries can be dynamic-link libraries (DLLs) or hybridized native shared runtime libraries (SRLs). For an application that is not PIC compiled, TNS/R libraries can only be native SRLs. TNS/R native C compiler. The C compiler that generates TNS/R object files.
TNSVU Glossary TNSVU. A tool used on TNS/E systems to browse through TNS object files that have been accelerated by the TNS Object Code Accelerator (OCA). TNSVU displays Intel Itanium code in addition to TNS code. word. An instruction-set-defined unit of memory that corresponds to the width of registers and to the most common and efficient size of memory operations. A TNS word is 2 bytes (16 bits) wide, beginning on any 2-byte boundary in memory.
$RECEIVE Glossary Inspect Manual—429164-006 Glossary-20
Index Numbers 9 format of DISPLAY PIC command 6-73 A A command 7-1 Abbreviation of keywords 6-1 ABEND clause,BREAK command 6-21 Accelerate Glossary-1 Accelerated program 15-4 debugging 16-4, 17-2 execution 15-3 on TNS/E system 18-1 program performance 15-3 transitions 16-3 Accelerated program debugging accesses to 32-bit words 16-12 annotated ICODE 16-23 at a memory-exact point 16-8 at a register-exact point 16-8 COBOL programs 16-13 code breakpoints 16-4, 16-8 data access limitations 16-15, 16-16 data bre
B Index ADD command 6-6 ADD ALIAS 3-5, 6-7 ADD KEY 3-5, 6-9 ADD PROGRAM 3-3, 6-10 causing a debug event 2-8 on a TNS/E system 18-8 with TNS/R native programs 17-6 ADD SOURCE ASSIGN 3-4, 6-14 ALIAS command 3-5, 3-6, 6-17 Aliases BREAK THEN command description of 6-8 used in alias 6-22 deleting 6-30 echoing expansion 6-174 editing 6-83 IF command, used in 6-103 listing 6-131 Aliases,adding 6-7 annotated ICODE with accelerated programs on TNS/E 6-98 Annotated ICODE,with accelerated programs 16-23 Application
C Index Breakpoints (continued) processing 2-11 See also Code breakpoints See also Data breakpoints setting 2-9, 6-19 unconditional 2-10 BYTE unit in DISPLAY FOR command 6-65 C C 8-1 C clause of SELECT LANGUAGE 6-167 C command 7-1 C language,starting to debug a program 8-1 C space identifier 7-2 Call history 2-13, Glossary-2 Call to unresolved external causing a debug event 2-9 CASE clause of SOURCE SEARCH command 6-209 CD command 6-27 CHARACTER FORMAT session parameter setting 6-172 showing 6-194 CISC G
D Index Command modes (continued) See Command modes Command terminal 4-3, 5-3 Commands Annotation 16-22 entering 3-1 high-level 6-1 customizing a session 3-5 debugging current program 3-2 entering and editing commands 3-4 managing a session 3-6 managing multiple programs 3-3 managing source files 3-3 See also individual commands simplifying a session 3-6 INFO-LOCATION 16-17 INFO-OBJECTFILE 16-18 LIST-PROGRAM 16-18 low-level 7-1 SET 16-20 SOURCE 16-20 STEP 16-21 usability 3-6 COMMENT command 3-6, 6-28 Comp
D Index Data breakpoints (continued) default 16-12 maximum number 2-10 Read/Write 16-13 usage considerations 6-24/6-26 Write 16-12 Data display restrictions with accelerated programs 16-5 Data locations 2-18 COBOL 10-5, 10-7 C++ 9-5, 9-7 FORTRAN 11-5, 11-8 Pascal 12-5, 12-7 pTAL 13-5 TAL 13-5 Data types COBOL 10-9, 10-10 C++ 9-7, 9-9 FORTRAN 11-8, 11-11 Pascal 12-7, 12-15 pTAL 13-9, 13-11 TAL 13-9, 13-11 DEBUG access 15-14 conditional breakpoints 2-11, 15-14 SELECT DEBUGGER DEBUG command 6-165, 15-14 Debu
E Index DISPLAY command (continued) DISPLAY REGISTER description of 6-42, 17-7 on a TNS/E system 18-8 DISPLAY TNS/R REGISTER 15-13 DISPLAY TYPE 6-75 DISPLAY VALUE 6-58 EMS data,description of 6-48 EMS data,token formatting 6-53 expressions 6-58, 6-61 registers 6-42 SPI data 6-48 SPI data,token formatting 6-53 strings 6-58 TNS/R registers 15-13 DISPLAY command,description of 3-2 DISPLAY command,functions of 6-33 DMON process 1-7, 1-9 creator of save files 2-5 error messages C-3 function in PATHWAY server d
G Index Fatal errors A-1 FB command 3-4, 6-84 ADD ALIAS command 6-8 ADD KEY command 6-10 IF command 6-103 FC command 3-4, 6-84 ADD ALIAS command 6-8 ADD KEY command 6-10 IF command 6-103 Features of Inspect 1-1 FILE clause of SOURCE command 6-198 File data types Pascal 12-9 FILE option of LINE location format 6-176 FILENAME display type 6-76 FILENAME32 display type 6-77 FILES command 3-6, 6-89/6-90 FILLER fields in records displaying 6-39 modifying 6-150 Fix commands See FA, FB, FC, and FK commands FK com
I Index High-level mode (continued) See also individual commands simplifying a session 3-6 low-level differences 7-4 History buffer editing command 6-84 executing command 6-224 listing commands 6-135 HISTORY command 3-4, 3-6, 6-93 HOLD command causing a debug event 2-8 description of 3-2, 6-93 Hold state 2-8 Home terminal 4-3, 5-3 I I command description of 7-1 editing templates 6-86 I keyword in low-level mode 7-3 I unit See INSTRUCTION unit ICODE base of DISPLAY IN command 6-71 ICODE clause of SOURCE c
K Index INSPCSTM file keyword abbreviations 6-1 personal customization 1-4 Inspect components 1-7 entering commands 3-1 error and warning messages A-1 in the PATHWAY environment 5-2 See also Inspect process INSPECT attribute 4-4 Inspect banner 2-2 Inspect debugging attribute 4-4 Inspect PATHCOM command causing a debug event 2-8 Inspect process 1-7, 1-8 function in process debugging 4-2 function in requester program debugging 5-4 function in save file examination 4-2 Inspect prompt 2-3 setting format 6-178
M Index LINE unit SET SOURCE BACK command 6-183 SET SOURCE FOR command 6-183 SOURCE BACK command 6-197, 6-204 SOURCE FOR command 6-197, 6-204 linkfile Glossary-7 linking Glossary-7 LIST BREAKPOINT command 3-3 LIST command 6-129 LIST ALIAS 3-5, 6-131 LIST BREAKPOINT 6-131 LIST HISTORY 3-5, 6-135 LIST KEY 3-5, 6-136, 6-137 LIST PROGRAM 3-3, 6-137 with accelerated programs 16-19 with TNS/R native programs 17-10 LIST SOURCE ASSIGN 3-4, 6-141 LIST SOURCE OPEN 3-4, 6-142 List, command See Command list loadfile
N Index Messages, error and warning (continued) Inspect A-1 Millicode execution 15-3 Modify at register-exact points 16-4 restrictions with accelerated programs 16-4 MODIFY command 3-3, 6-146 MODIFY REGISTER 6-146 MODIFY SIGNALS 17-11 MODIFY TNS/R registers 15-14 TNS/R debugging restrictions 16-16 TNS/R registers 15-14 with accelerated programs 16-16 Multilanguage programs, support 1-4 Multiple programs, debugging 2-7 N Native mode debugging (TNS/R) 15-5, 17-2 Native mode (TNS/R) differences from TNS and
P Index Operators in expressions (continued) pTAL 13-9 TAL 13-9 Optimization 2-17 effect on a debug event 2-9 INFO LOCATION, displayed by 6-109 Optimized compilers, support of 1-4 OSS environment file name resolution 14-2 save file 14-3 signals 14-3 source file 14-4 system type 14-2 OUT clause of STEP command 6-213 OUT command 3-6, 6-155 P P command 7-1 P register displaying 6-43 modifying recorded in save file 2-5 Pascal code locations 12-2, 12-4 command usage guidelines 12-15, 12-16 data locations 12-5
Q Index Process (continued) debugging attributes of creator 4-7 debugging session BREAK key during 4-11 configuring for 4-8 ending 4-12 starting 4-8 two terminals, using 4-10 startup call, debugging attributes 4-7 PROCESS HANDLE display type 6-77 Processes 2-4 Processing breakpoints 2-11 PROCESSOR SET PROMP 16-20 SET STATUS 16-20 PROCESSOR item in Inspect prompt 6-179 PROCESSOR item in status message 6-189 PROCESS_CREATE_ procedure 4-8 PROCESS_LAUNCH_ procedure 4-8 PROCS clause of STEP OUT command 6-213 P
S Index Record data types COBOL 10-9 FILLER fields displaying 6-39 modifying 6-150 FORTRAN 11-10 Pascal 12-10 Recursive activation of scope units 2-14 REGISTER clause DISPLAY command 6-42 MODIFY command 6-148 TRACE command 6-219 Registers displaying 6-42 displaying TNS/R registers 15-13 low-level expressions 7-3 modifying 6-146 modifying TNS/R registers 15-14 Register-exact point add breakpoint 16-8 data access limitations 16-15 display registers 16-8 display TNS variables 16-8 event reporting 16-15 instr
S Index Scope paths (continued) See Current scope path FORTRAN 11-1, 11-2 Pascal 12-1, 12-2 pTAL 13-1 TAL 13-1 scope unit Glossary-12 Scope units 2-11, 2-13, Glossary-12 active Glossary-1 COBOL 10-1 FORTRAN 11-1 history of activation,See Call history names of, matching 6-144 Pascal 12-1 pTAL 13-1 TAL 13-1 Segments in current program 6-125 SELECT command 6-164 SELECT DEBUGGER DEBUG 6-165 SELECT LANGUAGE 3-5, 6-166 SELECT PROGRAM 3-3, 6-167, 17-11 SELECT SEGMENT 6-169 SELECT SOURCE SYSTEM 6-169 SELECT SYSTY
S Index SOURCE command (continued) SOURCE ICODE 6-204 with TNS/R native programs 17-11 SOURCE OFF 3-7, 6-207 SOURCE ON 3-7, 6-208 SOURCE OPEN 3-7, 6-208 SOURCE SEARCH 6-208 SOURCE SYSTEM 3-7, 6-211 with accelerated programs 16-20 Source files closing opened source files 6-32 listing opened source files 6-142 SOURCE FOR session parameter setting 6-183 showing 6-194 used by SOURCE command 6-198 SOURCE item in Inspect prompt 6-180 SOURCE RANGE session parameter setting 6-184 showing 6-194 used by SOURCE SEAR
T Index STEP command 3-2, 6-212 leaving hold state 2-8 STEP item in Inspect prompt 6-180 StmtDebug effects on debugging 16-6 STOP clause BREAK command 6-21 CLEAR command 6-27 STOP command description of 3-2, 6-215 ending a session 4-12 Stop state 2-8 Stopping DMON C-2 Stopping IMON C-2 Strings displaying 6-58 Inspect prompt 6-178 status message 6-188 Structure data types pointers to, C++ 9-8 pTAL 13-10 TAL 13-10 SUBPROC SCOPING session parameter setting 6-191 showing 6-194 SUBPROCS clause of STEP OUT comm
T Index Terminal control process See TCP THEN clause BREAK command 6-19, 6-22, 6-24 BREAK command, of alias used in 6-8 OBEY used in 6-152 IF command 6-103 TIME command 6-219 TIMESTAMP display type 6-78 Timestamp of save file 6-13 TNS interpreted mode 18-1 TNS Object Code Accelerator (OCA) Glossary-15 TNS processes debugging on TNS/E system 18-1 TNS register access limitations at memory-exact points 16-17 at non-exact points 16-17 at register-exact points 16-16 TNSVU 6-98 TNS/E system debugging on 18-1 de
U Index Transitions 15-4 Traps causing a debug event 2-9 starting a process debugging session 4-10 Triggering breakpoints 2-11 TYPE clause of DISPLAY command display types 6-75 SPI types 6-49, 6-50 TYPE item in status message 6-190 U UC space identifier 6-77, 6-220, 7-2 UL space identifier 6-77, 6-220, 7-2 Unconditional breakpoints 2-10 Union data types in C++ 9-9 User conversion routines See PATHWAY user conversion routines User data space recorded in save file 2-5 User library 15-4 accelerated program
Special Characters Index # (pound sign) (continued) C code locations 13-2 COBOL code locations 10-3 FORTRAN code locations 11-3 Pascal code locations 12-4 TAL code locations 13-2 scope paths, preceding 2-12 COBOL 10-1 FORTRAN 11-1 Pascal 12-1 TAL 13-1 #data block INFO IDENTIFIER command 6-105 #DEBUGPROCESS TACL function causing a debug event 2-9 starting a process debugging session 4-9 #NEWPROCESS TACL function debugging attributes 4-8 ##GLOBAL INFO IDENTIFIER command 6-105 INFO SCOPE command 6-123 pTAL d