diff options
author | Daniel Jacobowitz <dan@debian.org> | 2008-03-14 18:39:43 +0000 |
---|---|---|
committer | Daniel Jacobowitz <dan@debian.org> | 2008-03-14 18:39:43 +0000 |
commit | e8ec7f8ff59cb2245ad128a731968d949c97f2db (patch) | |
tree | b39d079bf3a6d0e19ddc1cb2d6ece806f4be9536 /bfd | |
parent | 788ad6c7f67691d1bab92c522f8e1c0cd90f9533 (diff) | |
download | gdb-e8ec7f8ff59cb2245ad128a731968d949c97f2db.tar.gz |
* 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.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 4 | ||||
-rw-r--r-- | bfd/cache.c | 16 |
2 files changed, 4 insertions, 16 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 54f5a9bb892..b49f99dc7ed 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2008-03-14 Daniel Jacobowitz <dan@codesourcery.com> + + * cache.c (close_one): Remove mtime hack. + 2008-03-14 H.J. Lu <hongjiu.lu@intel.com> PR ld/5913 diff --git a/bfd/cache.c b/bfd/cache.c index 064cebeb3cb..eb6120dfbe2 100644 --- a/bfd/cache.c +++ b/bfd/cache.c @@ -166,22 +166,6 @@ close_one (void) kill->where = real_ftell ((FILE *) kill->iostream); - /* Save the file st_mtime. This is a hack so that gdb can detect when - an executable has been deleted and recreated. The only thing that - makes this reasonable is that st_mtime doesn't change when a file - is unlinked, so saving st_mtime makes BFD's file cache operation - a little more transparent for this particular usage pattern. If we - hadn't closed the file then we would not have lost the original - contents, st_mtime etc. Of course, if something is writing to an - existing file, then this is the wrong thing to do. - FIXME: gdb should save these times itself on first opening a file, - and this hack be removed. */ - if (kill->direction == no_direction || kill->direction == read_direction) - { - bfd_get_mtime (kill); - kill->mtime_set = TRUE; - } - return bfd_cache_delete (kill); } |