When debugging with gdb, sometimes the displayed running position is strange. When I use n
to execute the next line, the instruction I want to focus on has already been executed. Below is an example. The cursor showing the execution position is not currently placed on any command
When I use the n command, the result is as shown in the figure below.
You can see that the cursor does not stay on line 911. Sometimes skip several lines.
And the cursor often stays on the comment.