Advanced steps

It was already mentioned that all stepping commands may have also attached szadb requests. As a matter of fact there is even one default, for :f. To get a similar effect for other steps just type what you want to be executed after a given command on the szadb input line. For example

:s ="this string printed by :s command"n
You will notice that this form of :step does not move you ahead in the program. This gives an opportunity to set and modify requests in advance, without an immediate execution. It also saves your nerves if you are not a very good typist. To really step by one instruction forward hit 〈Return〉 and observe what will happen. As noted before :j is a variant of :n and setting request for it will really change what is attached to :n.

The example above is not tremendously useful, but tracking values of a chosen registers can be. Or anything else that you need and that will fit on the command line. This condition is much less limiting than it appears when used in conjunction with function keys.

There are two points to remember. There is no syntax check while you are setting requests. Watch what you are typing if you do not want to see only error messages. And there is nothing to prevent a direct or indirect recursion. Since a depth of szadb stack is limited and 〈^C〉 does not always work it is better to avoid such constructs.

If you came to a conclusion that the only way to change requests attached to a stepping command is to overtype them with something else then you are correct. Moreover an empty string is not a good replacement since it causes an execution. Luckily there is some other way to turn a noise off. Try typing ::s- and similar commands for :n and :f. Switched off requests are not gone, unless later redefined. They can be brought back by a similar command as above in which - was replaced with +. The default request for :f is special. It cannot be overtyped or turned on by ::f+. To bring it back use ::f` instead.

There is one more way of request switching. If you will type, for example, ::n_, then whatever was attached to :s will be performed also for :n, instead of a ``native'' command. This gives an opportunity to create, say, a quite complicated request for :n and most of the time execute a simpler request for :s. When an original request for :n is needed it is enough to type ::n+ to get it back. The same mechanism works for :f, temporarily redirecting its requests ``down'' to the first active one. There is no similar switching going the other way. To gain a better understanding try all of this after defining various requests for each of stepping commands and examine effects with the $b command after every switch.

It is also possible to make user breakpoint silent or not. For example

main:b ="entering main"
main::b- and main::b+ turns the action off and on.