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


 
1-6 Getting Started: A Ski Tutorial Copyright © 2000 Hewlett-Packard Co.
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!)
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
Figure 1-7. Changing the Data Window Display
Figure 1-8. The Data Window Showing the argv and envp Vectors