Este é provavelmente um problema com a otimização do gcc e a subseqüente tabela de números de linha criada por DWARF que mapeia
memory addresses that contain the executable code of a program and the source lines that correspond to these addresses
(page 8)
A solução mais simples é usar stepi quando a função é alcançada
Em Manual do usuário do GDB (página 65)
step
Continue running your program until control reaches a different source line, then stop it and return control to gdb.
....
The step command only stops at the first instruction of a source line. This pre- vents the multiple stops that could otherwise occur in switch statements, for loops, etc. step continues to stop if a function that has debugging information is called within the line. In other words, step steps inside any functions called within the line.
Also, the step command only enters a function if there is line number information for the function. Otherwise it acts like the next command. This avoids problems when using cc -gl on MIPS machines. Previously, step entered sub- routines if there was any debugging information about the routine.