aboutsummaryrefslogtreecommitdiff
path: root/gold/fileread.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2011-03-10 01:10:19 +0000
committerIan Lance Taylor <ian@airs.com>2011-03-10 01:10:19 +0000
commita19fefdc57f5eafcb682175f2b2bcd8f6f366c90 (patch)
tree3c4abd7d266759ded5aaa769f4cd36219d5967d8 /gold/fileread.cc
parent9f6db0d3fd276c9aeaf31a9d88153b05a66d17f9 (diff)
downloadgdb-a19fefdc57f5eafcb682175f2b2bcd8f6f366c90.zip
gdb-a19fefdc57f5eafcb682175f2b2bcd8f6f366c90.tar.gz
gdb-a19fefdc57f5eafcb682175f2b2bcd8f6f366c90.tar.bz2
* fileread.cc (File_read::clear_views): Don't delete the whole
file view.
Diffstat (limited to 'gold/fileread.cc')
-rw-r--r--gold/fileread.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/gold/fileread.cc b/gold/fileread.cc
index 654e47b..36485a9 100644
--- a/gold/fileread.cc
+++ b/gold/fileread.cc
@@ -717,7 +717,9 @@ File_read::clear_views(Clear_views_mode mode)
should_delete = false;
else if (mode == CLEAR_VIEWS_ALL)
should_delete = true;
- else if (p->second->should_cache() && keep_files_mapped)
+ else if ((p->second->should_cache()
+ || p->second == this->whole_file_view_)
+ && keep_files_mapped)
should_delete = false;
else if (this->object_count_ > 1
&& p->second->accessed()