[Converted from Gnats 2546] When using TUI do debug programs, and the source is changed by some other programs, the debugging session should be able to continue normally. It very common for me to find a bug and alter it right away on my source code. Keeping files unsaved isn't good practice overall, right? And the problem is annoyer when the changes are simple (like typos) or just cosmestic (formatting expressions, lines, ...) or doesn't have to do with one specific problem I pursue on that debugging session. I think that gdbtui should either reload both executable and source text, or keep the source in memory. But more problems will arise with multi-file program, I think. Maybe the date of the files when the program was compiled should exist and be verified from gdb? Ps: if I would be to save some state from a gdbtui session (like comand history) would be a nice thing to do together with solving this problem. Release: GNU gdb 6.8-debian Environment: Linux goof 2.6.24-19-generic #1 SMP Wed Aug 20 22:56:21 UTC 2008 i686 GNU/Linux How-To-Repeat: To reproduce the behavior I refer: load a program on a new GDBTUI session. Step to some source line. Alter the source code on that (or others) line. Run the program so that the altered lines goes out of screen at some point, before you reach them again. Now you are debugging a program seeing the source of another program.
If to be fixed, it is a core side problem, not TUI's in particular. See PR8684.
*** This bug has been marked as a duplicate of 8684 ***