In gdb , when you run the next command. It applies to the innermost frame, not the selected frame. How to ask gdb to break the next line of the selected frame?
For instance:
Set a breakpoint in a subfunction:
(gdb) b subfunc Breakpoint 1 at 0x400f09: file prog.c, line 94. (gdb) c Continuing. Breakpoint 1 at 0x400f09: file prog.c, line 94. 94 void subfunc() {
Change the selected frame:
(gdb) up
I want to stop at line 71 prog.c :
(gdb) n 95 i = 0;
... but he stops the line 95 prog.c
source share