HP IA-64 User Manual

0 (0)

Ski IA-64 Simulator Reference Manual

Rev. 1.0L (26 Apr 00)

Copyright © 2000 Hewlett-Packard Co.

Ski IA-64 Simulator Reference Manual 1.0L

Notice

The information in this document is subject to change without notice.

HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Hewlett-Packard shall not be liable for errors contained herein or for incidental or consequential damages in connection with furnishing, performance, or use of this material.

This document contains information which is protected by copyright. All rights are reserved. No part of this document may be photocopied, reproduced, or translated to another language without the prior written consent of Hewlett-Packard.

Copyright © 2000 by HEWLETT-PACKARD COMPANY.

Printing History

• First Edition: Revision 1.0L, April, 2000

Trademarks

Linux is a registered trademark of Linus Torvalds. MS-DOS and Windows are registered trademarks of Microsoft Corporation. UNIX is a trademark or registered trademark of the Santa Cruz Operation. Intel is a registered trademark of the Intel Corporation.

ii

Notice

Copyright © 2000 Hewlett-Packard Co.

Ski IA-64 Simulator Reference Manual 1.0L

Preface

This document is the Ski IA-64 Simulator Reference Manual. The goal of this document is to provide a description of the features, commands, and simulation environment provided by the Ski IA-64 simulator. The version of the simulator described here is Version 0.873l.

How to Use This Manual

The first chapter of this manual is a quick-start tutorial. Using only the first chapter, you can learn enough about Ski to do useful work. If you are using Ski to simulate an IA-64 application program and are familiar with debuggers such as HP’s xdb, the first chapter and Appendix A, “Command Reference” may be all you need to read.

The remaining chapters provide information about Ski in depth. Use these chapters to learn about commands not covered in the tutorial and to learn more about how Ski operates.

Use Appendix A, “Command Reference” and the on-line help command to find a list of all Ski commands and a brief description of each command.

Use Appendix D, “Simulator Status and Error Messages” to understand the causes and possible solutions for each of Ski’s error messages.

Font Conventions

In this manual, fonts are used as described below. Depending on how you are viewing this document (paper, a web page, a PDF file, etc.), some distinctions may not be visible.

italic

is used for optional text including operand fields such as count, and for the names of bitfields such as psr.be.

light italic

is used for graphical button names such as Run.

fixed-width bold

is used for literal text including commands such as dbndl, and for examples such as bski -icnt foo <bar >baz.

SMALL UPPERCASE

is used for processor instructions such as BREAK.

fixed-width regular

is used for directories and filenames such as hello, and for web URL’s such as http://www.hp.com.

Syntax Conventions

In this manual, symbols are used as described below.

[italic]

Square brackets surrounding optional argument(s) indicate that the argument(s) can be omitted, as in the Appendix A, “Command Reference” description of the dj command: dj [address].

Copyright © 2000 Hewlett-Packard Co.

Preface

iii

Ski IA-64 Simulator Reference Manual 1.0L

italic+

A plus sign applied to an argument indicates that the argument must be supplied one or more times, as in the Appendix A, “Command Reference” description of the eval command: eval expression_without_spaces+.

[italic]+

A plus sign applied to optional argument(s) in square brackets indicates that the argument(s) can be supplied zero or more times, as in the Appendix A, “Command Reference” description of the load command: load filename [args]+.

iv

Syntax Conventions

Copyright © 2000 Hewlett-Packard Co.

Ski IA-64 Simulator Reference Manual 1.0

Table of Contents

1 Getting Started: A Ski Tutorial

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. . .

.

.

.

.

.

.

.

.

.

.

.

. 1-1

1.1 The Ski Simulator . . .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. . .

.

.

.

.

.

.

.

.

.

.

.

. 1-1

1.2How to Run an IA-64 Application Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1

1.2.1Starting xski. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1

1.2.2Exiting Ski . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3

1.2.3Loading Your Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3

1.2.4Inspecting Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5

1.2.5Viewing Data in ASCII . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8

1.2.6Looking at Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8

1.2.7Viewing Source Code Mixed In with Assembly Code . . . . . . . . . . . . . . . . . . . . . . . . 1-9

1.2.8Controlling Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10

1.2.9Running a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11

1.2.10 Single-stepping a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12

1.2.11Changing Registers and Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13

1.2.12Getting Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-17

1.2.13Next Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-17

2 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1

2.1Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1

2.1.1Ski’s Strengths. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1

2.1.2 Ski’s Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1

2.2What You Need to Know to Use This Manual. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1

2.3Defects and Defect Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1

2.4 Ski Variations . . . . . . . . . . . . . . . .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. .

.

.

.

.

.

.

.

.

.

.

.

.

. 2-2

2.4.1 Using bski for Batch Simulations

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. .

.

.

.

.

.

.

.

.

.

.

.

.

. 2-2

2.5Starting Ski . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4

2.5.1Command Line Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4

2.5.2The XSki File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5

2.6Quitting Ski. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6

2.6.1Summary of the Quit Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6

3 Screen Presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . 3-1

3.1

Ski’s Use of Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

.

.

.

.

.

.

.

.

.

.

. 3-1

3.2

The Register Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

.

.

.

.

.

.

.

.

.

.

. 3-1

3.2.1The User Registers Pane. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2

3.2.2The General Registers Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3

3.2.3 The Floating Point Registers Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3

3.2.4The System Registers Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4

3.2.5The IA-32 Registers Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4

3.3Resizing Register Window Panes with xski . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5

3.4The Register Window and ski . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5

3.5The Program Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6

3.5.1IA-64 Instruction Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6

3.5.2IA-32 Instruction Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8

3.5.3Changing the Range of Locations Shown in the Program Window. . . . . . . . . . . . . . . . . . 3-9

3.5.4Invalid Code and the Program Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9

3.6The Data Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10

3.6.1Changing the Range of Locations Shown in the Data Window . . . . . . . . . . . . . . . . . . . 3-11

3.6.2Invalid Code and the Data Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12

3.7The Command/Main Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12

3.7.1The xski Main Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12

3.7.2The ski Command Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13

3.8Other Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14 4 Command Language. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1

Copyright © 2000 Hewlett-Packard Co.

Table of Contents

v

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-Mode IA-64 Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1

6.2.2Application-Mode IA-32 Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1

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

6.3.1System-Mode IA-64 Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2

6.3.2System-Mode IA-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.

Ski IA-64 Simulator Reference Manual 1.0

8.7.1Summary of Symbol Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8

9 Command Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1

9.1Initialization File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1

9.2Labels and Control Flow in Command Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1

9.2.1 The goto Command and Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1

9.2.2The if Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2

9.3Comments in Command Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2

9.4An Example Command File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2

9.5Summary of Command File Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3

A Command Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

A-1

B Register Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .B-1

B.1 IA-64 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .B-1

C Internal Variable Names. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C-1

C.1 Internal Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C-1

D Simulator Status and Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

D-1

Copyright © 2000 Hewlett-Packard Co.

Table of Contents

vii

Ski IA-64 Simulator Reference Manual 1.0

viii

Table of Contents

Copyright © 2000 Hewlett-Packard Co.

Ski IA-64 Simulator Reference Manual 1.0L

 

 

List of Figures

 

Figure 1-1.

Starting xski From the Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2

Figure 1-2.

The Four Primary xski Windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3

Figure 1-3.

Loading the “ hello” Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4

Figure 1-4.

The xski Program Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4

Figure 1-5.

The xski Data Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5

Figure 1-6.

The xski Register Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5

Figure 1-7.

Changing the Data Window Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6

Figure 1-8.

The Data Window Showing the argv and envp Vectors . . . . . . . . . . . . . . . . . . . . . . . . . 1-6

Figure 1-9.

The Data Window Showing argv and envp Strings in Hexadecimal . . . . . . . . . . . . . . . . . . 1-7

Figure 1-10.

The Main Window Showing Commands in the Command History . . . . . . . . . . . . . . . . . . . 1-7

Figure 1-11.

The Data Window Showing argv and envp Strings in ASCII . . . . . . . . . . . . . . . . . . . . . . 1-8

Figure 1-12.

Jumping the Program Window to the Beginning of main(). . . . . . . . . . . . . . . . . . . . . . . . 1-9

Figure 1-13.

The Program Window Showing Code at the Beginning of main() . . . . . . . . . . . . . . . . . . . . 1-9

Figure 1-14.

The Program Window Showing a Breakpoint at main() . . . . . . . . . . . . . . . . . . . . . . . . 1-10

Figure 1-15.

The Breakpoint List Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11

Figure 1-16.

The Terminal Window After the “ hello” Program is Run . . . . . . . . . . . . . . . . . . . . . .

1-12

Figure 1-17.

The xski Main Window after the “ hello” Program is Run . . . . . . . . . . . . . . . . . . . . . .

1-12

Figure 1-18.

The Main Window After Reaching the Breakpoint at main+10 . . . . . . . . . . . . . . . . . . . .

1-13

Figure 1-19.

The xski Register Window After Stopping at a Breakpoint at main+10. . . . . . . . . . . . . . . .

1-14

Figure 1-20.

The xski Register Window After Changing the ip Register . . . . . . . . . . . . . . . . . . . . . . 1-15

Figure 1-21.

The xski Data Window Widened to Show ASCII . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16

Figure 1-22.

The xski Data Window After Changing the “Hello, world” String . . . . . . . . . . . . . . . . . .

1-16

Figure 1-23.

The xski Main Window Showing an eval Command and Its Result . . . . . . . . . . . . . . . . . 1-17

Figure 2-1.

The Curses-based ski Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2

Figure 2-2.

The X Window System, Motif-based xski Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3

Figure 2-3.

The Command-Line bski Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4

Figure 3-1.

The Register Window in xski

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2

Figure 3-2.

The xski User Registers Pane

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3

Figure 3-3.

The xski General Registers Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3

Figure 3-4.

The xski Floating Point Registers Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4

Figure 3-5.

The xski System Registers Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4

Figure 3-6.

The xski IA-32 Registers Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5

Figure 3-7.

An xski Pane Resizer: The Small Box Between the Scrollbars . . . . . . . . . . . . . . . . . . . . . 3-5

Figure 3-8.

The ski Register Window (at Top) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6

Figure 3-9.

xski’s Program Window Showing Part of an IA-64 “hello world” Program . . . . . . . . . . . . . . 3-7

Figure 3-10.

xski’s Program Window Showing IA-64 Predication and Breakpoints . . . . . . . . . . . . . . . . . 3-8

Figure 3-11.

xski’s Program Window Showing IA-32 Code, the Instruction Pointer, and a Breakpoint . . . . . . . 3-9

Figure 3-12.

xski’s Program Window Showing Illegal Instructions . . . . . . . . . . . . . . . . . . . . . . . . . 3-10

Figure 3-13.

xski’s Program Window Showing Unallocated Space or No Translation . . . . . . . . . . . . . . .

3-10

Figure 3-14.

xski’s Data Window Showing Unallocated Space Followed by Data . . . . . . . . . . . . . . . . .

3-11

Figure 3-15.

xski’s Data Window Showing Data Interpreted as Instruction Bundles . . . . . . . . . . . . . . . .

3-11

Figure 3-16.

xski’s Main (Command) Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3-13

Figure 3-17.

ski’s Command Window (at Bottom) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3-14

Figure 3-18.

xski’s Symbol List Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3-15

Figure 4-1.

xski Evaluating Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3

Figure 4-2.

xski’s Symbol List Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4

Figure 5-1.

xski’s Program Window Showing IA-64 Assembly Language Code . . . . . . . . . . . . . . . . . . 5-3

Figure 5-2.

xski’s Program Window Showing Intermixed C and IA-64 Assembly Code . . . . . . . . . . . . . . 5-4

Figure 5-3.

xski’s Assembly Language Dump Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4

Figure 5-4.

xski Showing Data as Instruction Bundles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5

Figure 5-5.

xski Showing Data in Raw Hexadecimal and ASCII . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6

Figure 5-6.

xski’s Hexadecimal Dump Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. 5-6

Figure 6-1.

Example Code to Simulate an External Interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2

Figure 6-2.

sdt Command Output in xski . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3

Copyright © 2000 Hewlett-Packard Co.

List of Figures

ix

Ski IA-64 Simulator Reference Manual 1.0L

Figure 8-1.

The Original Program Loaded in ski . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8-2

Figure 8-2.

The Program After Assigning a String in ski . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8-3

Figure 8-3.

Three Breakpoints, 0, 2, and 1, Visible in xski’s Program Window . . . . . . . . . . . . . . . . . .

8-5

Figure 8-4.

xski’s Breakpoint List Window Showing IA-64 and IA-32 Breakpoints. . . . . . . . . . . . . . . .

8-6

Figure 8-5.

The symlist Output from xski . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8-9

Figure 9-1.

An Example Command File to Compute Fibonacci Numbers . . . . . . . . . . . . . . . . . . . . .

9-3

x

List of Figures

Copyright © 2000 Hewlett-Packard Co.

Ski IA-64 Simulator Reference Manual 1.0L

List of Tables

Table 4-1. Ski Simulator Arithmetic and Logic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 Table 7-1. Linux System Calls Supported by Ski . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2 Table 7-2. Linux System Calls Accepted but Ignored by Ski . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2 Table 7-3. MS-DOS System Calls (in Hexadecimal) Supported by Ski . . . . . . . . . . . . . . . . . . . . . . . 7-3

Copyright © 2000 Hewlett-Packard Co.

List of Tables

xi

Ski IA-64 Simulator Reference Manual 1.0L

xii

List of Tables

Copyright © 2000 Hewlett-Packard Co.

Ski IA-64 Simulator Reference Manual 1.0L

1

Getting Started: A Ski Tutorial

 

 

 

 

In this chapter, you learn how to use Ski by executing a brief tutorial. At the end of the tutorial, you will learn where to look in this manual for detailed descriptions of Ski’s operation and commands. Introductory information on Ski is presented in Chapter 2, “Overview”.

1.1The Ski Simulator

Ski simulates the IA-64 architecture and also has limited support for simulating IA-32 programs. Ski runs on IA-32 Linux host systems. You can use Ski for many purposes, as described in Section 2.1, “Introduction”. One of the most common uses of Ski is to test an IA-64 program in a Linux environment, and in this chapter, you will learn how to use xski, the X Window System version of Ski, by “walking through” a sample session, in about ten minutes. Ok, twenty minutes.

You should already be familiar with the IA-64 architecture and the C programming language, have xski installed on your Linux system, and have the XSki file in your home directory or in your X Window System app-defaults directory, typi- cally /usr/lib/X11/app-defaults. You will also need to have an executable Linux IA-64 program such as the classic “ hello world” program.

1.2How to Run an IA-64 Application Program

Ski provides a Linux application environment in which an IA-64 program you provide can be simulated. The release notes provide the most up-to-date information on Ski’s support for the Linux Application Binary Interface (ABI). The following sections provide a short tutorial which leads you through an IA-64 program session with xski. You will learn how to use the most common Ski commands.

1.2.1Starting xski

As shown in Figure 1-1, start xski by typing its name to the Linux shell, just like any other Linux program, as shown in Figure 1-1. When running inside the IA-64 Linux Native User Environment (NUE), make sure that the environment variable DISPLAY is set to a string of the form hostname:display (e.g., ‘‘ myhost:0’’, values such as ‘‘ unix:0’’ or ‘‘ :0’’ won’t work) before invoking xski. If you have never run the simulator before, it will first prompt you to read and accept the software license it is distributed under. After accepting the license, the four primary xski windows will be displayed on your screen, as shown in Figure 1-2. No IA-64 program is loaded yet, so the Program Window and Data Window are empty. Scroll the various panes of the Register Window and note that with few exceptions, the registers are set to zero.

Copyright © 2000 Hewlett-Packard Co.

Getting Started: A Ski Tutorial

1-1

Ski IA-64 Simulator Reference Manual 1.0L

Figure 1-1. Starting xski From the Command Line

1-2

Getting Started: A Ski Tutorial

Copyright © 2000 Hewlett-Packard Co.

Ski IA-64 Simulator Reference Manual 1.0L

Figure 1-2. The Four Primary xski Windows

1.2.2Exiting Ski

You can quit xski and this tutorial with the Quit button, with the File->Quit menu selection, or with the “ quit” command. All are in the Main Window. (Don’t quit now; you are just beginning!)

1.2.3Loading Your Program

Use the “Command” area of the “main” Window to load your program. For example, let’s say your program is the famous “Hello, world” program, the executable file is named “ hello”, and the source code file is named “ hello.c”. Type “ load hello” in the Command area to load it into Ski, as you see in Figure 1-3. After a moment, the other three windows will change appropriately: the Program Window will show the program code in assembly language form as shown in Figure 1-4, the Data Window will show global and static data as shown in Figure 1-5, and the Register Window will show, in r12 the value of the stack pointer, as shown in Figure 1-6. (You may need to use the scrollbar in the general registers pane of the Register Window to see these registers.)

Copyright © 2000 Hewlett-Packard Co.

Getting Started: A Ski Tutorial

1-3

Ski IA-64 Simulator Reference Manual 1.0L

Figure 1-3. Loading the “ hello” Program

Figure 1-4. The xski Program Window

1-4

Getting Started: A Ski Tutorial

Copyright © 2000 Hewlett-Packard Co.

HP IA-64 User Manual

Ski IA-64 Simulator Reference Manual 1.0L

Figure 1-5. The xski Data Window

Figure 1-6. The xski Register Window

1.2.4Inspecting Data

To look at the argv and envp strings, you need to use the Data Window. Linux passes argc, argv, and envp on the memory stack (r12). To look at this memory area, use the “ dj” command (“ data jump”) in “Command” area of the Main Window. Supply, as an operand, the address of the memory stack. For example, if r12 is set to 9ffffffffff780, you can

Copyright © 2000 Hewlett-Packard Co.

Getting Started: A Ski Tutorial

1-5

Ski IA-64 Simulator Reference Manual 1.0L

type “ dj r12” or “ dj 9ffffffffff780”, as shown in Figure 1-7 and the Data Window changes to display the hexadecimal data stored at the location, as shown in Figure 1-8. Find the value of r12 in your program and use “ dj” now. (You might wonder why “ dj” exists, instead of a simple scroll bar. Imagine scrolling through the entire IA-64 address space– it would take a long, long time!)

Figure 1-7. Changing the Data Window Display

Figure 1-8. The Data Window Showing the argv and envp Vectors

Looking at the Data Window, you can see that the first 16 bytes of the stack are all zeros. This is a scratch storage area. The next 8-byte word contains argc, the argument count. It has a value of 1 as the only argument passed to the program is the program name itself. The argc count is then followed by the argv and envp vectors. All C programs receive the same kind of data structure for argv: a variable-length vector of char * pointers whose end is marked with a NULL pointer. In Figure 1-8, the first of the char * pointers is 9ffffffffffff938. (The first char * pointer may be in a different place on your system. Adjust the following instructions accordingly.) Jump the Data Window there using the command “ dj 9ffffffffffff938” (12 f’s) and you will see Figure 1-9, showing the hexadecimal codes for the null-terminated ASCII

1-6

Getting Started: A Ski Tutorial

Copyright © 2000 Hewlett-Packard Co.

Ski IA-64 Simulator Reference Manual 1.0L

character strings of argv and envp. (In a moment, you’ll learn how to see data in ASCII translation.)

Figure 1-9. The Data Window Showing argv and envp Strings in Hexadecimal

Typing hexadecimal numbers is error-prone, and Ski provides several shortcuts to avoid it. The first is xski’s Command History, an unlabeled window pane just above the “Command” area in the Main Window. As you execute commands, they move up to the Command History. Later, you can bring them back into the Command area. A single click brings a command back for you to edit. A double click brings the command back and re-executes it immediately. Try the Command History by doing this: Type “ dj 0” to jump the Data Window to location 0. The Main Window should look like Figure 1-10. Then click on the “ dj 9ffffffffffff938” command in the Command History. Hit the enter/return key to execute it.

Figure 1-10. The Main Window Showing Commands in the Command History

Copyright © 2000 Hewlett-Packard Co.

Getting Started: A Ski Tutorial

1-7

Ski IA-64 Simulator Reference Manual 1.0L

Another shortcut is the * pointer-dereference operator for indirect addressing. Type “ dj 0” to jump the Data Window to location 0. Then type “ dj *(r12+18)”. Ski will take the contents of r12 (9ffffffffff780, remember?), add 18 (hex) and use that as the address of the operand. The * operator fetches the contents of *(r12+18) and uses that value, 9ffffffffff938, as the address to jump to. Compare the Data Window display resulting from “ dj r12+18” with the display resulting from “ dj *(r12+18)”.

You will use the * operator a lot in debugging C programs because it performs the same function as C’s * operator: it dereferences pointers. Unlike C’s *, however, Ski’s * operator is not type-specific: you can use it in any context where any kind of address is needed and you can use it to dereference registers like r12, memory locations, or anything that has a value. (This doesn’t always make sense, of course. For example, dereferencing a floating-point register is rarely useful because floating-point registers don’t hold pointers.)

1.2.5Viewing Data in ASCII

Hexadecimal is no fun. To expose the ASCII translation, use your window manager’s standard mechanism to make the Data Window wider. (How you do this depends on the window manager you’re using, but generally this can be accomplished by grabbing the edge of the Data Window with your mouse cursor and dragging it to the right.) You should see approximately Figure 1-11. Now click on the Main Window, to make it the active window again. Try the “ df” (“ data forwards”) and “ db” (“ data backwards”) commands without operands to move forwards and backwards in the Data Window, one screenful each time.

Figure 1-11. The Data Window Showing argv and envp Strings in ASCII

1.2.6Looking at Code

Initially, the Program Window shows the beginning of the program. For C programs, this isn’t the first line of user code, it’s the start-up routine from crt1.o that provides an interface between the operating system environment and the ANSI C environment. This routine is named “ _start” and the ELF header in hello names it as the start of the program. That’s what Ski shows in the Program Window by default: the start of the program according to ELF.

You use the “ pj” command (“ program jump”) to jump the program window elsewhere. For example, jump it to the first instruction in the user’s main(), as shown in Figure 1-12. The Program Window now looks like Figure 1-13. You can move the Program Window forwards and backwards through program code with the “ pf” (“ program forwards”) and “ pb” (“ program backwards”) commands, respectively. Try these commands, and then try using “ pj” without an operand: note how it jumps you back and forth between the previous and current locations. The “ dj” command does the same thing in the Data Window. Handy, eh?

1-8

Getting Started: A Ski Tutorial

Copyright © 2000 Hewlett-Packard Co.

Ski IA-64 Simulator Reference Manual 1.0L

Figure 1-12. Jumping the Program Window to the Beginning of main()

Figure 1-13. The Program Window Showing Code at the Beginning of main()

1.2.7Viewing Source Code Mixed In with Assembly Code

The Program Window shows the C source code intermixed with the IA-64 assembly code. You can turn the source code

Copyright © 2000 Hewlett-Packard Co.

Getting Started: A Ski Tutorial

1-9

Ski IA-64 Simulator Reference Manual 1.0L

display off or on using the pa (“ program assembly”) and pm (“ program mixed”) commands, respectively. Mixed code display only works if you have the source code to the program available to Ski; the source code isn’t embedded in the ELF file. Also, you must compile your code with the appropriate compiler flags, for example, with the -g flag used by many C compilers to generate debug line record information. If your program is composed of multiple object files, for example “ cc -o test foo.o bar.o baz.o”, Ski can only show source code from the files compiled with the -g flag. Make sure the Program Window is in mixed mode for now.

1.2.8Controlling Breakpoints

You can think of Ski as a debugger that happens to work on a simulated processor rather than a real processor. Like any good debugger, Ski provides breakpoints. To set a breakpoint in an IA-64 program, use the “ bs” command (“ breakpoint set”). In the example that follows, you will want to have the Program Window display the area of code near main(). Use the command “ pj main”, as you learned above.

To set a breakpoint at the beginning of main(), type “ bs main” in the Main Window. The Program Window shows a “ 0” in the first column of the window at the breakpoint location (the ‘‘alloc’’ instruction), because you just used breakpoint #0, as Figure 1-14 shows. (The first three columns are also used for line numbers.) Set a breakpoint at main+10 and another at main+20. Ski lets you set up to ten breakpoints.

Figure 1-14. The Program Window Showing a Breakpoint at main()

Use the “ bl” command (“ breakpoint list”) to see a list of the breakpoints, as shown in Figure 1-15. If you prefer using a mouse, use the “Breakpoints” item on the View menu instead of the “ bl” command. When you are finished viewing the breakpoint list, click its Close button to dismiss the window.

To delete breakpoints individually, use the “ bd” command (“ breakpoint delete”). Use the “ bD” command (“ breakpoint Delete all”) to delete all breakpoints at once. Delete all your breakpoints before continuing this tutorial.

1-10 Getting Started: A Ski Tutorial

Copyright © 2000 Hewlett-Packard Co.

Ski IA-64 Simulator Reference Manual 1.0L

Figure 1-15. The Breakpoint List Window

1.2.9Running a Program

To run your program, type the “ run” command or click the Run button in the Main Window. Ski will start the simulation and connect the program’s standard I/O ports (stdin, stdout, and stderr) to Ski’s standard ports. For example, assuming there are no breakpoints still set in hello, you will see “hello world” printed out when you run it, as Figure 1-16 shows, and run statistics will appear in the Main Window, as Figure 1-17 shows. The statistics tell you how many instructions were simulated and how much time it took, the instructions-per-second rate, the number of IA-64 processor cycles that were consumed on the simulated CPU, and the average number of instructions per cycle, which provides an indication of the best-case effective parallelism of the program. (Ski simulates all the instructions in an instruction group in one cycle; a hardware implementation may not be as capable.)

Ski will stop the simulation for three reasons: if a breakpoint is reached, if the IA-64 program attempts to access privileged resources or non-existent memory, or if the program ends normally by calling exit() or similar functions. If simulation stops due to a breakpoint, you can continue simulation with the “ cont” command (“ continue”) or you can step through the simulation with the “ step” command or Step button. You cannot re-run a program, nor can you re-load it and start over. You must exit and re-enter xski and then reload your program.

Copyright © 2000 Hewlett-Packard Co.

Getting Started: A Ski Tutorial 1-11

Ski IA-64 Simulator Reference Manual 1.0L

Figure 1-16. The Terminal Window After the “ hello” Program is Run

Figure 1-17. The xski Main Window after the “ hello” Program is Run

1.2.10Single-stepping a Program

To try single-stepping (and no, this is not a kind of ethnic dance), set a breakpoint at main+10. Then use the “ run” command or Run button to simulate the program up to the breakpoint. (If you receive the error message “ Nothing to run”, stop and reread the last sentence in the previous paragraph.) Ski stops at the breakpoint and notifies you with a message in

1-12 Getting Started: A Ski Tutorial

Copyright © 2000 Hewlett-Packard Co.

Ski IA-64 Simulator Reference Manual 1.0L

the Main Window. Ski tells you why it stopped and gives you statistics about program execution up to this point, as you can see in Figure 1-18. The Program Window marks the next instruction to be fetched with a greater-than symbol in the second column. If the instruction is predicated off, Ski uses an asterisk instead of a greater-than symbol, and shows the predication register in parentheses.

Figure 1-18. The Main Window After Reaching the Breakpoint at main+10

Move and resize your windows so the Main Window and Program Window don’t overlap. Now use the “ step” command or Step button to execute one instruction. Note that the greater-than symbol moves down one line: Ski keeps track of IA64 bundles and groups but it simulates individual instructions. You can follow the “ step” command with a (decimal) number to specify how many steps Ski should take, for example, “ step 10” to execute ten instructions. As a shortcut, shift-clicking on the Step button causes Ski to take ten steps. Most Ski commands can be abbreviated, as described in Appendix A, “Command Reference”. The step command can be abbreviated as “ s”.

1.2.11Changing Registers and Memory

To debug a program, you usually need to inspect and alter registers and memory. The first three panes in the Register Window shows the registers of most concern to application programmers: user registers in the first pane, general registers in the second pane, and floating point registers in the third pane, as you can see in Figure 1-19.

Copyright © 2000 Hewlett-Packard Co.

Getting Started: A Ski Tutorial 1-13

Ski IA-64 Simulator Reference Manual 1.0L

Figure 1-19. The xski Register Window After Stopping at a Breakpoint at main+10

By changing the value of the ip register, you can change where in the program Ski will resume simulation. Enter the command “ = ip main+20” in the Main Window and observe the first line of the first pane in the Register Window: notice that the ip register changes to reflect your command, as Figure 1-20 shows. (You may need to left-click in the Main Window to make it active.) You can make similar changes to all of the architecturally-visible, non-hardwired IA-64 registers, which helps you debug your program. You can test your program’s behavior in exceptional cases, such as handling unusual errors.

1-14 Getting Started: A Ski Tutorial

Copyright © 2000 Hewlett-Packard Co.

Ski IA-64 Simulator Reference Manual 1.0L

Figure 1-20. The xski Register Window After Changing the ip Register

Changing registers isn’t enough to debug most programs, however. Often, you need to change values in memory as well. Ski provides several commands for this, differing in whether they modify one-byte chunks, two-byte chunks, four-byte chunks, eight-byte chunks, or variable-length C-language text strings. For example, instead of “hello world”, you can have the program output “Ski!Ski!Ski!”. You can do this by using the “ =s” command (“ = string”) to modify the data stored at the address “ _IO_stdin_used+8”. (The string may be stored at a different address in your program. If so, use the Data Window to locate the string and then use the corresponding address instead.) Here’s what to do:

First, make sure the Data Window is wide enough to show ASCII translations along with hexadecimal, as in Figure 1-21. To avoid confusion, make sure the Data Window doesn’t overlap the Main Window.

Copyright © 2000 Hewlett-Packard Co.

Getting Started: A Ski Tutorial 1-15

Ski IA-64 Simulator Reference Manual 1.0L

Figure 1-21. The xski Data Window Widened to Show ASCII

Next, issue the command “ =s _IO_stdin_used+8 Ski!Ski!Ski!” in the Main Window. (You may need to left-click in the Main Window to make it active.) Observe how the Data Window changes: the hexadecimal values at, and after, _IO_stdin_used+8 have changed, as have their corresponding ASCII translations, and a null byte (the value zero) has been added to the end of your string to make it a valid C-language string. Compare Figure 1-21 and Figure 1-22.

Figure 1-22. The xski Data Window After Changing the “Hello, world” String

The commands to change one, two, four, and eight byte quantities are =1, =2, =4, and =8, respectively. They are described in detail in Appendix 8.1, “Changing Registers and Memory with Assignment Commands” and in Appendix A, “Command Reference”.

Often, you will need to evaluate formulas. For example, to find the address of the first envp string, you would need to compute the sum of the contents of r12 and 18 (hex) and then add the length of the argv vector (argc+1) multiplied by eight (the size of a char * on IA-64). To do this, you use the “ eval” command in the Main Window, as shown in Figure 1-23. (The use of the “ *” operator was discussed in Section 1.2.4, “Inspecting Data”.) As you see, the result is shown in decimal and hexadecimal.

1-16 Getting Started: A Ski Tutorial

Copyright © 2000 Hewlett-Packard Co.

Ski IA-64 Simulator Reference Manual 1.0L

Figure 1-23. The xski Main Window Showing an eval Command and Its Result

1.2.12Getting Help

To see what commands are available, type “ help” in the Main Window or use the Help->Commands menu selection. To see the syntax of a specific command, type “ help” followed by the command name, as in “ help eval”.

1.2.13Next Steps

Congratulations! You now know how to use xski to test an IA-64 program. In the rest of this manual, you’ll find out how to use ski and bski and the many additional commands and facilities not covered in this brief tutorial.

Chapter 2, “Overview” presents the capabilities of Ski, how to start it and stop it, and a brief discussion of installation issues. The chapter also shows how to use bski for batch simulations.

Chapter 3, “Screen Presentation”, discusses the various screen displays of xski and ski in depth.

Chapter 4, “Command Language”, defines the syntax of the language you use to control Ski’s operation.

Chapter 5, “Screen Manipulation Commands”, presents the Ski commands for controlling Ski’s screen displays.

Chapter 6, “Program Simulation”, introduces the concepts of Ski program simulation, shows you how to load programs, and presents the Ski commands for simulating a program. Much of the information needed to use Ski for firmware development and operating system simulation is in this chapter.

Chapter 7, “Linux and MS-DOS ABI Emulation”, discusses the Ski mechanisms and support for simulating application programs. If you are using Ski for to develop system software, such as bootstrap firmware or operating systems, you can skip this chapter.

Chapter 8, “Debugging”, presents Ski commands and facilities that are useful in debugging and tuning programs.

Chapter 9, “Command Files”, introduces command files, a mechanism that lets you extend Ski to meet your particular needs.

The appendices contain summaries of the Ski command set, a list of the registers and internal variables Ski recognizes, and a description of the Ski error and status messages, their causes, and, for error messages, possible solutions.

Copyright © 2000 Hewlett-Packard Co.

Getting Started: A Ski Tutorial 1-17

Ski IA-64 Simulator Reference Manual 1.0L

1-18 Getting Started: A Ski Tutorial

Copyright © 2000 Hewlett-Packard Co.

Loading...
+ 80 hidden pages