User`s guide

92
Chapter 7: Debugging Machine Language Code
Tracing Execution at the Machine Level
The tracei command allows you to observe the progress of your program
while debugging machine code, just as you can with the trace command
while debugging source code. Thetracei command traces in units of machine
instructions instead of in lines of code.
Each trace is assigned a number when you create it. Use this number to
reference the breakpoint in the various commands provided for
manipulating breakpoints (for example, disable, enable, and delete, all
described in “Managing Breakpoints, Traces, and Conditional Commands”
on page 70).
The syntax of the tracei command is:
tracei [expression|variable]
Whenever the specified variable changes, dbx prints the old
and new values of that variable. (For machine-level
debugging.) Note that execution is very slow if you choose
this type of trace.
If the expression is of type pointer, look at the data pointed
to and watch until it changes. If the expression is not of type
pointer, look at the 32 bits at that address (assume the
expression evaluates to an address).
tracei procedure
This command is equivalent to entering trace procedure.
dbx prints the values of the parameters passed to the
specified procedure whenever your program calls it. Upon
return, dbx prints the return value.
tracei [expression|variable] at address
Prints the value of the variable whenever your program
reaches the specified address. (For machine-level
debugging.)
If the expression is of type pointer, look at the data pointed
to and watch until it changes. If the expression is not of type
pointer, look at the 32 bits at that address (assume the
expression evaluates to an address).