diff options
author | Daniel Jacobowitz <drow@false.org> | 2008-04-30 18:22:37 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2008-04-30 18:22:37 +0000 |
commit | 939643d727a6988e89a4b521aa9b8bb898696eb6 (patch) | |
tree | cdfcd6c5b5388298fa9e7b4b60e664c04bd0941c /gdb/corefile.c | |
parent | 5550a9142a995bbc726886d39b11be10b7a6fdba (diff) | |
download | binutils-gdb-939643d727a6988e89a4b521aa9b8bb898696eb6.tar.gz |
* corefile.c (reopen_exec_file): Close any open files.
Diffstat (limited to 'gdb/corefile.c')
-rw-r--r-- | gdb/corefile.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/corefile.c b/gdb/corefile.c index b1dbc6b6b63..1da2b2a8393 100644 --- a/gdb/corefile.c +++ b/gdb/corefile.c @@ -164,6 +164,11 @@ reopen_exec_file (void) if (exec_bfd_mtime && exec_bfd_mtime != st.st_mtime) exec_file_attach (filename, 0); + else + /* If we accessed the file since last opening it, close it now; + this stops GDB from holding the executable open after it + exits. */ + bfd_cache_close_all (); #endif } |