HP Ski Simulator manual Ski IA-64 Simulator Reference Manual

Page 6

Ski IA-64 Simulator Reference Manual 1.0

4.1Command Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1

4.2Command Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1

4.3Command Sequences, Repetition, and Abbreviation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1

4.4Argument Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2

4.4.1Numeric Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2

4.4.2Symbolic Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4

4.4.3Resolving Ambiguous Symbols and Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5 5 Screen Manipulation Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1

5.1Register Window Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1

5.1.1Summary of Register Window Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1

5.2Program Window Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2

5.2.1Summary of Program Window Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2

5.3Data Window Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5

5.3.1Summary of Data Window Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5

6 Program Simulation

6-1

6.1 Application-Mode and System-Mode Simulation

6-1

6.2Ski Support for Application-Mode Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1

6.2.1Application-ModeIA-64 Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1

6.2.2Application-ModeIA-32 Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1

6.3Ski Support for System-Mode Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1

6.3.1System-ModeIA-64 Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2

6.3.2System-ModeIA-32 Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2

6.3.3System-Mode TLB Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2

6.4Misaligned Data Access Trap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3

6.5Program Loading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3

6.5.1How to Load a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3

6.5.2Summary of Program Loading Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4

6.5.3Notes about Program Loading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4

6.6Program Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5

 

6.6.1 Summary of Program Execution Commands

6-5

7 Linux and MS-DOS ABI Emulation

7-1

7.1

Interruptions

7-1

7.2

Linux Application Environment

7-1

7.3MS-DOS Application Environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3

7.4Program I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3 8 Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1

8.1Changing Registers and Memory with Assignment Commands . . . . . . . . . . . . . . . . . . . . . . . . 8-1

8.1.1Summary of Assignment Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1

8.1.2Examples of Assignment Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1

8.1.3Notes on Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3

8.2Evaluating Formulas and Formatting Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4

8.2.1Summary of The eval Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4

8.3Program Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4

8.3.1Setting Program Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4

8.3.2Deleting Program Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-5

8.3.3Listing Program Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-5

8.3.4Notes on Program Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6

8.3.5Summary of Program Breakpoint Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6

8.4Data Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7

8.4.1Setting Data Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7

8.4.2Deleting Data Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7

8.4.3Listing Data Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7

8.4.4Summary of Data Breakpoint Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7

8.5Dumping Registers and Memory to a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8

8.6

Saving and Restoring the Simulator State

8-8

 

8.6.1 Summary of Save and Restore Commands

8-8

8.7

Symbol Table Commands

8-8

vi

Table of Contents

Copyright © 2000 Hewlett-Packard Co.

Image 6
Contents Ski IA-64 Simulator Reference Manual Copyright 2000 Hewlett-Packard CoPrinting History Trademarks Font Conventions How to Use This Manual Preface 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 Ski Simulator How to Run an IA-64 Application ProgramGetting Started a Ski Tutorial 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 What You Need to Know to Use This Manual OverviewIntroduction 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 Arguments Command LanguageCommand Entry Command Sequences, Repetition, and AbbreviationNumbers and Counts Argument SpecificationNumeric Arguments ExpressionsSki Simulator Arithmetic and Logic Operators Xski Evaluating ExpressionsSymbolic Arguments Program-Defined SymbolsAddresses Labels Resolving Ambiguous Symbols and NumbersInternal Variables FilenamesSki IA-64 Simulator Reference Manual 1.0L Summary of Register Window Commands Screen Manipulation CommandsRegister 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 filenameDj address Data Window CommandsSummary of Data Window Commands Df countXski Showing Data in Raw Hexadecimal and Ascii Dd startingaddress endingaddress filenameSki Support for Application-Mode Programs Program SimulationApplication-Mode and System-Mode Simulation Ski Support for System-Mode ProgramsSystem-Mode IA-32 Programs Summary of TLB Display CommandsSystem-Mode IA-64 Programs System-Mode TLB SimulationMisaligned Data Access Trap How to Load a ProgramProgram Loading Adding Information after Loading Summary of Program Loading CommandsLoad filename args+ 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 Examples of Assignment Commands Changing Registers and Memory with Assignment CommandsSummary of Assignment Commands DebuggingOriginal Program Loaded in ski Bit-encoded Registers AllocationEvaluating Formulas and Formatting Data Summary of The eval CommandSetting Program Breakpoints Program BreakpointsDeleting Program Breakpoints Listing Program BreakpointsSummary of Program Breakpoint Commands Unexpected BreakpointsBs address Data Breakpoints Setting Data BreakpointsSummary of Data Breakpoint Commands Deleting Data BreakpointsSummary of Symbol Commands Symbol Table CommandsSummary of Save and Restore Commands Dumping Registers and Memory to a FileSymlist Output from xski Isyms filenameSki IA-64 Simulator Reference Manual 1.0L Debugging Goto Command and Labels Command FilesLabels and Control Flow in Command Files Initialization FileComments in Command Files An Example Command FileIf Command # comment Summary of Command File Commandsfilename 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