Another stepping command is the :j jump request. Its purpose it to short-circuit loops. It behaves exactly like :n in that it skips-over function calls but unlike the :n request which follows branch instructions, the :j will place a temporary breakpoint at the instruction immediately following the current instruction in memory. Think of :n as step-next-logical instruction and :j as step-next-physical instruction. The idea is that you only use :j to step-out of loops where you are sitting on the loop-back branch.
[]jumpone.exm
In the example above, if you are sitting on the bnz instruction and you
wish to execute the remainder of the loop at full speed then you use the
:j, which places a temporary breakpoint at the location .end.
However care
must be taken when using this command because it is possible that the
flow-of-control never reaches the temporary breakpoint.
[]jumptwo.exm
This is a case where NOT to use the :j command.
Basically to use the :j
request you should know how your C compiler sets up its loops or where your
assembler code is meant to go. It is sometime a good idea to put a safety
breakpoint somewhere you know you will end up.
Because of the unusual nature of the :j request, it will not autorepeat if the next command is just a 〈return〉 key. Instead :n is performed. Also it is also considered a variant of :n when attaching execution requests to stepping commands (see further down).
It should be also mentioned that all stepping commands have upper case
counterparts, which are noisier. When used they return the a full register
display after the step (:S is like doing :s;$r
).