Summary of the content on the page No. 1
Ski IA-64 Simulator Reference Manual
Rev. 1.0L (26 Apr 00)
Copyright © 2000 Hewlett-Packard Co.
Summary of the content on the page No. 2
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, INCLUD- ING, 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 co
Summary of the content on the page No. 3
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 t
Summary of the content on the page No. 4
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 Appen- dix A, “Command Reference” description of theeval 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 theload command:load filename [args]+. iv Synta
Summary of the content on the page No. 5
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.2 How to Run an IA-64 Application Program . . . . . . . . . . . . . . . . . .
Summary of the content on the page No. 6
Ski IA-64 Simulator Reference Manual 1.0 4.1 Command Entry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 4.2 Command Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 4.3 Command Sequences, Repetition, and Abbreviation . . . . . . . . . . . . . . . . . . . . . . . . . .
Summary of the content on the page No. 7
Ski IA-64 Simulator Reference Manual 1.0 8.7.1 Summary of Symbol Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8 9 Command Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1 9.1 Initialization File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Summary of the content on the page No. 8
Ski IA-64 Simulator Reference Manual 1.0 viii Table of Contents Copyright © 2000 Hewlett-Packard Co.
Summary of the content on the page No. 9
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Summary of the content on the page No. 10
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 Bre
Summary of the content on the page No. 11
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Summary of the content on the page No. 12
Ski IA-64 Simulator Reference Manual 1.0L xii List of Tables Copyright © 2000 Hewlett-Packard Co.
Summary of the content on the page No. 13
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 pre- sented in Chapter 2, “Overview”. 1.1 The 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
Summary of the content on the page No. 14
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.
Summary of the content on the page No. 15
Ski IA-64 Simulator Reference Manual 1.0L Figure 1-2. The Four Primary xski Windows 1.2.2 Exiting Ski You can quit xski and this tutorial with the Quit button, with the File->Quit menu selection, or with the “quit” com- mand. All are in the Main Window. (Don’t quit now; you are just beginning!) 1.2.3 Loading 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”,
Summary of the content on the page No. 16
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.
Summary of the content on the page No. 17
Ski IA-64 Simulator Reference Manual 1.0L Figure 1-5. The xski Data Window Figure 1-6. The xski Register Window 1.2.4 Inspecting Data To look at theargv andenvp strings, you need to use the Data Window. Linux passesargc,argv, andenvp on the mem- ory stack (r12). To look at this memory area, use the “dj” command (“datajump”) in “Command” area of the Main Win- dow. Supply, as an operand, the address of the memory stack. For example, if r12 is set to 9ffffffffff780, you can Copyright © 2000 Hewlett
Summary of the content on the page No. 18
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 hexadec- imal 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 Sho
Summary of the content on the page No. 19
Ski IA-64 Simulator Reference Manual 1.0L character strings ofargv andenvp. (In a moment, you’ll learn how to see data in ASCII translation.) Figure 1-9. The Data Window Showingargv andenvp 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 th
Summary of the content on the page No. 20
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