* cache.c (close_one): Remove mtime hack.

* corefile.c (reopen_exec_file): Use exec_bfd_mtime.
	* exec.c (exec_bfd_mtime): Define.
	(exec_close): Clear it.
	(exec_file_attach): Set it.
	* gdbcore.h (exec_bfd_mtime): Declare.
	* source.c (find_source_lines): Do not use bfd_get_mtime.
This commit is contained in:
Daniel Jacobowitz
2008-03-14 18:39:43 +00:00
parent 952dc227b2
commit c04ea773f9
7 changed files with 23 additions and 20 deletions

View File

@@ -160,10 +160,9 @@ reopen_exec_file (void)
/* If the timestamp of the exec file has changed, reopen it. */
filename = xstrdup (bfd_get_filename (exec_bfd));
make_cleanup (xfree, filename);
mtime = bfd_get_mtime (exec_bfd);
res = stat (filename, &st);
if (mtime && mtime != st.st_mtime)
if (exec_bfd_mtime && exec_bfd_mtime != st.st_mtime)
exec_file_attach (filename, 0);
#endif
}