Only indispensable commands of dbx
are supported
in the current version.
Generally, the effect of a command is the same as that of dbx
.
There are, however, slight differences:
Commands step
and next
execute the next statement, but not
the next line; therefore, if there are multiple statements in one line,
one should issue such commands several times to proceed the next line.
The debugger reads in `.dbxinit', which allows the same aliases
as is used in dbx
.
step
next
finish
step
has been executed.
cont
quit
up [n]
down [n]
frame [n]
where
.
list [startline]
list function
print expr
func function
stop at sourceline [if cond]
stop in function
if
statements are repeatedly encountered,
Asir enters debug-mode only when the corresponding
cond parts are evaluated to a non-zero value.
trace expr at sourceline [if cond]
trace expr in function
stop
. trace
simply displays the value
of expr and without entering the debug-mode.
delete n
status
command.
status
where
alias alias command
The debugger command print
can take almost all expressions
as its argument. The ordinary usage is to print the values of
(programming) variables. However, the following usage is worth to
remember.
(debug) print A A = 2 (debug) print A=1 A=1 = 1 (debug) print A A = 1
print
.
(debug) print length(List) length(List) = 14In this example, the length of the list assigned to the variable
List
is examined by a function length()
.
(debug) print ctrl("cputime",1) ctrl("cputime",1) = 1This example shows such a usage where measuring CPU time is activated from within the debug-mode, even if one might have forgotten to specify the activation of CPU time measurement. It is also useful to save intermediate results to files from within the debug-mode by the built-in function
bsave()
when one is
forced to quit the computation by any reason.
(debug) print bsave(A,"savefile") bsave(A,"savefile") = 1Note that continuation of the parent function will be impossible if an error will occur in the function call from within the debug-mode.
Go to the first, previous, next, last section, table of contents.