I'm not sure I fully understand this question, but I can say how GDB implements the team step.
After the control has entered a specific compilation unit, GDB reads this CU debugging information; in particular, it reads the CU part of the .debug_line section and builds a table that displays the addresses of commands in the position of the source code.
step, GDB . , , . , step.
— — , . , , , step .
, , , :
int fact(n) { if (n > 0) { return n * fact(n-1); } else return 1; }
, , . , , , , . :
fact (n=10) at recurse.c:4
(gdb) step
fact (n=9) at recurse.c:4
(gdb) step
fact (n=8) at recurse.c:4
GDB next . , , ; .
, ( DWARF ). .
, , Apple , lldb, .