HP Ski Simulator, IA-64 Command/Main Window, Invalid Code and the Data Window, Xski Main Window

Page 48

Ski IA-64 Simulator Reference Manual 1.0L

3.6.2Invalid Code and the Data Window

If you tell Ski to display non-existent memory, Ski will display x’s instead, as shown in Figure 3-14.Non-existent mem- ory is defined for the Data Window similarly to its definition for the Program Window, described in Section 3.5.4, “Invalid Code and the Program Window”, except that the relevant bit for system-mode programs is psr.dt.

3.7The Command/Main Window

xski and ski are command-driven simulators. Most of your interaction with them is done by typing commands. Your commands are typed in a window titled “ main” in xski (see Figure 3-16)and “ Command” in ski (see Figure 3-17).

3.7.1The xski Main Window

xski divides the Main Window into five areas:

Menus: File, View, Configure, and Help. The File menu provides a “Quit” selection for you to exit the program. The View menu lets you choose which windows to see. The Configure menu is currently non-functional. The Help menu provides a “Commands” selection that displays the commands Ski recognizes and a “Product Information” selection that displays information about xski.

• Buttons: Step, Run, Prog, Data, Regs, Cache, TLB, and Quit. Clicking on the Step button executes the command

step 1”, single-stepping the simulated program. Shift-clicking the button executes the command “ step 10”, step- ping the simulated program through ten instructions. The Run, Prog, Data, and TLB buttons execute the run, pj, dj, and sdt commands respectively. If the Program Window has been closed (removed from the screen, not merely min- imized to an icon), the Prog button recreates it. The Data button operates similarly with respect to the Data Window. The Regs and Cache buttons are currently non-functional.

xski’s buttons are configurable. Using the X Window System resource mechanism, you can change the number of buttons, the button labels, and the commands the buttons emit. The easiest way to do this is to edit the XSki file, described in Section 2.5.2, “The XSki File”. Much of xski’s user interface behavior is controlled by this file but you should be careful in making changes to any elements other than button descriptions; xski may change in the future in ways that are not backwards-compatible with changes you make.

Command History: commands you’ve already entered.

Command: where you type commands to xski.

Responses: responses and error messages from xski.

The Menu, Button, and Command History areas provide shortcuts for typing commands. The Step button is particularly useful: when you are single-stepping through a program, you can click on the Step button instead of repeatedly typing the

step” command. The Command History area provides another way to avoid typing: you can double-click on a command in the Command History to run the command again, or single-click on the command to move it to the Command area where you can edit and then re-run it. The Command area is where you type commands to the simulator, but, as mentioned above, you can use the menus, buttons, and Command History as shortcuts. Two useful commands to know are “ help”, which causes a window listing all the commands to be displayed, and “ help command” which causes information about the command to be shown in the Responses area. The Responses area is also used by the simulator to give you feedback when it can’t execute one of your commands.

xski understands the Prev and Next keys and the arrow keys found on many HP keyboards. When the Main Window has the X Window System focus, the current area is highlighted, usually with a bright outline. You can make a different area current with Tab and Shift-tab. The Prev, Next, up-arrow, and down-arrow keys scroll through the current area, allowing you to easily edit and re-run previous commands from the Command History and review previous messages in the Response area. In addition, you can use the Alternate key (“alt”) like a Shift key, along with the underlined letter in each menu name as a shortcut to access the menu, rather than using the mouse. For example, Alt+F brings up the File menu. This lets you spend less time shuttling between the keyboard and mouse, and more time doing productive work.

3-12 Screen Presentation

Copyright © 2000 Hewlett-Packard Co.

Image 48
Contents Ski IA-64 Simulator Reference Manual Copyright 2000 Hewlett-Packard CoPrinting History TrademarksHow to Use This Manual PrefaceFont Conventions Syntax ConventionsItalic+ Table of Contents Ski IA-64 Simulator Reference Manual Vii Ski IA-64 Simulator Reference Manual Viii Table of Contents List of Figures Ski IA-64 Simulator Reference Manual 1.0L List of Tables Ski IA-64 Simulator Reference Manual 1.0L Xii List of Tables How to Run an IA-64 Application Program Getting Started a Ski TutorialSki Simulator Starting xskiStarting xski From the Command Line Exiting Ski Loading Your ProgramLoading the hello Program Inspecting Data Xski Data WindowChanging the Data Window Display Data Window Showing argv and envp Strings in Hexadecimal Viewing Data in Ascii Looking at CodeViewing Source Code Mixed In with Assembly Code 12. Jumping the Program Window to the Beginning of mainControlling Breakpoints 14. The Program Window Showing a Breakpoint at mainRunning a Program 15. The Breakpoint List WindowSingle-stepping a Program 16. The Terminal Window After the hello Program is RunChanging Registers and Memory 18. The Main Window After Reaching the Breakpoint at main+10Ski IA-64 Simulator Reference Manual 1.0L 20. The xski Register Window After Changing the ip Register 21. The xski Data Window Widened to Show Ascii Getting Help Next StepsCopyright 2000 Hewlett-Packard Co Overview IntroductionWhat You Need to Know to Use This Manual Defects and Defect ReportingUsing bski for Batch Simulations Ski VariationsX Window System, Motif-based xski Interface Command Line Flags Starting SkiXSki File 1.1 Summary of FlagsSummary of the Quit Command Quitting SkiQuit expression Screen Presentation Ski’s Use of WindowsRegister Window User Registers Pane Register Window in xskiGeneral Registers Pane Floating Point Registers PaneSystem Registers Pane IA-32 Registers PaneResizing Register Window Panes with xski Register Window and skiProgram Window 1 IA-64 Instruction DisplaySki IA-64 Simulator Reference Manual 1.0L 2 IA-32 Instruction Display Changing the Range of Locations Shown in the Program Window Invalid Code and the Program WindowData Window 12. xski’s Program Window Showing Illegal InstructionsChanging the Range of Locations Shown in the Data Window Command/Main Window Invalid Code and the Data WindowXski Main Window Ski Command Window 16. xski’s Main Command Window17. ski’s Command Window at Bottom Other Windows18. xski’s Symbol List Window Copyright 2000 Hewlett-Packard Co Command Language Command EntryCommand Arguments Command Sequences, Repetition, and AbbreviationArgument Specification Numeric ArgumentsNumbers and Counts ExpressionsSki Simulator Arithmetic and Logic Operators Xski Evaluating ExpressionsSymbolic Arguments Program-Defined SymbolsAddresses Resolving Ambiguous Symbols and Numbers Internal VariablesLabels FilenamesSki IA-64 Simulator Reference Manual 1.0L Screen Manipulation Commands Register Window CommandsSummary of Register Window Commands Xski Register Window CommandsProgram Window Commands Summary of Program Window CommandsXski’s Program Window Showing IA-64 Assembly Language Code Xski’s Assembly Language Dump Window Pd startingaddress endingaddress filenameData Window Commands Summary of Data Window CommandsDj address Df countXski Showing Data in Raw Hexadecimal and Ascii Dd startingaddress endingaddress filenameProgram Simulation Application-Mode and System-Mode SimulationSki Support for Application-Mode Programs Ski Support for System-Mode ProgramsSummary of TLB Display Commands System-Mode IA-64 ProgramsSystem-Mode IA-32 Programs System-Mode TLB SimulationMisaligned Data Access Trap How to Load a ProgramProgram Loading Summary of Program Loading Commands Load filename args+Adding Information after Loading Creating the argc, argv, and envp ParametersSummary of Program Execution Commands Program ExecutionSki IA-64 Simulator Reference Manual 1.0L Program Simulation Linux and MS-DOS ABI Emulation InterruptionsLinux Application Environment Linux System Calls Supported by Ski Linux System Calls Accepted but Ignored by SkiMS-DOS Application Environment Program I/OMS-DOS System Calls in Hexadecimal Supported by Ski Copyright 2000 Hewlett-Packard Co Changing Registers and Memory with Assignment Commands Summary of Assignment CommandsExamples of Assignment Commands DebuggingOriginal Program Loaded in ski Bit-encoded Registers AllocationSummary of The eval Command Setting Program BreakpointsEvaluating Formulas and Formatting Data Program BreakpointsDeleting Program Breakpoints Listing Program BreakpointsSummary of Program Breakpoint Commands Unexpected BreakpointsBs address Setting Data Breakpoints Summary of Data Breakpoint CommandsData Breakpoints Deleting Data BreakpointsSymbol Table Commands Summary of Save and Restore CommandsSummary of Symbol Commands Dumping Registers and Memory to a FileSymlist Output from xski Isyms filenameSki IA-64 Simulator Reference Manual 1.0L Debugging Command Files Labels and Control Flow in Command FilesGoto Command and Labels Initialization FileComments in Command Files An Example Command FileIf Command Summary of Command File Commands filename# comment LabelSki IA-64 Simulator Reference Manual 1.0L Command Files Command Reference =s address stringwithoutspacesDbs address length rwrw Dbd breakpointnumberHelp commandname Eval expressionwithoutspaces+Quit returnvalueforshell Rest filenameStep until expressionwithoutspaces Ski IA-64 Simulator Reference Manual 1.0L Register Names IA-64 RegistersRegister Names Copyright 2000 Hewlett-Packard Co Register Names B-3 Ski IA-64 Simulator Reference Manual 1.0L Copyright 2000 Hewlett-Packard Co Register Names B-5 Ski IA-64 Simulator Reference Manual 1.0L Register Names Internal Variable Names Internal VariablesCopyright 2000 Hewlett-Packard Co Simulator Status and Error Messages All breakpoints deletedSimulator Status and Error Messages Expression Help Unknown command %s Missing ELF header Not an IA-64 file Stopping at %s due to unimplemented instruction Usage %s options file args