Bug 9651 - TUI shoudn't reread changed source files
Summary: TUI shoudn't reread changed source files
Status: RESOLVED DUPLICATE of bug 8684
Alias: None
Product: gdb
Classification: Unclassified
Component: tui (show other bugs)
Version: 6.8
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on: 8684
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-03 22:38 UTC by balacobaco
Modified: 2010-04-18 01:09 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description balacobaco 2008-11-03 22:38:02 UTC
[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.
Comment 1 Pedro Alves 2009-01-22 00:10:28 UTC
If to be fixed, it is a core side problem, not TUI's in particular.  See PR8684.
Comment 2 Pedro Alves 2010-04-18 01:09:37 UTC

*** This bug has been marked as a duplicate of 8684 ***