Hide Forgot
If executing the following gdb script, gdb quit the program on the finish command while i expect it should finish the current function file ls set $myvar = 1 break indent set $myvar = 0 finish set $myvar = 1 continue end r Version-Release number of selected component (if applicable): Tested on f16 & f17
Assuming you should have put "commands" after "break". Finish does not work in command lists, it should work as: file ls set $myvar = 1 break indent commands set $myvar = 0 up tbreak commands set $myvar = 1 continue end continue end r Untested, maybe also some "silent" should be there as it will be talkative this way. The problem is GDB commands get executed on a single stop, "finish" resumes execution, execution resume can be always only the last command of a sequence.