HP (Hewlett-Packard) IA-64 Manuale Utente

Pagina di 110
8-4
Debugging
Copyright © 2000 Hewlett-Packard Co.
Ski IA-64 Simulator Reference Manual 1.0L
8.2
Evaluating Formulas and Formatting Data
The
eval
command evaluates one or more expressions and prints the result(s) in decimal and hexadecimal. An example
of the
eval
8.2.1
Summary of The
eval
 Command
eval
expression
+
Evaluate the expression(s) and print the result(s) on the screen. If the expression is simply a register name, the value is
display in the appropriate format: decimal, hexadecimal, or symbolically, depending on the kind of register. If the
expression has any operators, the result is displayed in decimal and hexadecimal. For example, “
eval ip
” causes the
current value of the
ip
register to be displayed symbolically or in hexadecimal. But “
eval +ip
” causes the value to
be printed out in hexadecimal and decimal.
8.3
Program Breakpoints
Program breakpoints are “marks” within the executable code of a program that cause simulation to halt when they are
encountered in the normal flow of a running program. When simulation stops because of a breakpoint, the instruction
pointer (
ip
) is pointing to the instruction at which the breakpoint is set (before the instruction is executed) and control is
returned to you.
The simulator provides several commands to let you manipulate program breakpoints. These commands are explained in
detail below.
8.3.1
Setting Program Breakpoints
To set a breakpoint in IA-64 code, use the
bs
command. For IA-32 code, use the
iabs
command. If given with no argu-
ments, these commands set a breakpoint at the instruction pointed to by the
ip
register. If an address is given following the
command, the breakpoint is set at that address. The address must be valid when Ski resumes simulation; Ski will refuse to
simulate code if any breakpoints are set at non-existent addresses. You can set breakpoints in system-mode programs
using physical or virtual addresses. See Section 6.1, “Application-Mode and System-Mode Simulation” for information
about system-mode programming and Section 4.4.1.3, “Addresses” for information on physical vs. virtual addressing.
Up to ten breakpoints may be set at any one time. They are indicated by the digits “
0
” through “
9
” in the first column of
the program window, as the example in Figure 8-3 shows.