The stepi and nexti commands let you step through program execution incrementally, like the step and next commands. The stepi and nexti commands execute one machine instruction at a time, as opposed to one line of source code. The following example shows stepping at the machine-instruction level:
(idb) stop in main
[#1: stop in main ]
(idb) run
[1] stopped at [main:4 0x120001180]
4 for (i=1 ; i<3 ; i++) {
(idb) stepi
stopped at [main:4 0x120001184] stl t0, 24(sp)
(idb) [Return]
stopped at [main:5 0x120001188] ldl a0, 24(sp)
(idb) [Return]
stopped at [main:5 0x12000118c] ldq t12, -32664(gp)
(idb) [Return]
stopped at [main:5 0x120001190] bsr ra,
(idb) [Return]
stopped at [factorial:12 0x120001210] ldah gp, 8192(t12)
(idb)
At the machine-instruction level, you can step into, rather than over, a function's prologue. While within a function prologue, you may find that the stack trace, variable scope, and parameter list are not correct. Stepping out of the prologue and into the actual function updates the stack trace and variable information kept by the debugger.
Single-stepping through function prologues that initialize large local variables is slow. As a workaround, use the next command.