HP (Hewlett-Packard) IA-64 Computer Accessories User Manual


 
1-16 Getting Started: A Ski Tutorial Copyright © 2000 Hewlett-Packard Co.
Ski IA-64 Simulator Reference Manual 1.0L
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.
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, “Com-
mand 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.
Figure 1-21. The
xski
Data Window Widened to Show ASCII
Figure 1-22. The
xski
Data Window After Changing the “Hello, world” String