Step into

Step into is probably the easiest source stepping. You just single step until you reach the next statement.

Interface

class debugger
{
public:
    void step_into();
}

Interface explained

Note that without a call, step-into and step-over means the same thing.

In any stepping scenario, if you reach a breakpoint, then the breakpoint take precedence and the stepping completes.

Implementation

Setup single stepping and just automatically step until we reach a statement. Make sure we reset all the flags when the single stepping completes. Of course, if we reach a breakpoint, then just stops.

Practice notes

We are lucky because in our simple programming language, we never have function call that are not actual user calls. In many runtime, there are calls that correspond to helper calls, transition frames. We need to be able to recognize them and skip them appropriately, this also applies for the two more stepping primitives.

results matching ""

    No results matching ""