aboutsummaryrefslogtreecommitdiff
path: root/gold/options.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2009-10-28 00:42:34 +0000
committerIan Lance Taylor <ian@airs.com>2009-10-28 00:42:34 +0000
commit2c849493874929a145d42c2a977e693fe6faa19b (patch)
treef0280e29e8a4377877d64b0c67326cb01fab0302 /gold/options.h
parent2499805399b431a88cae733b292b04916e1295d6 (diff)
downloadgdb-2c849493874929a145d42c2a977e693fe6faa19b.zip
gdb-2c849493874929a145d42c2a977e693fe6faa19b.tar.gz
gdb-2c849493874929a145d42c2a977e693fe6faa19b.tar.bz2
* fileread.cc: (File_read::View::~View): Use the new
data_ownership_ filed. (File_read::~File_read): Dispose the new whole_file_view_. (File_read::open): Mmap the whole file if needed. (File_read::open): Use whole_file_view_ instead of contents_. (File_read::find_view): Use whole_file_view_ if applicable. (File_read::do_read): Use whole_file_view_ instead of contents_. (File_read::make_view): Use whole_file_view_ instead of contents_, update File_read::View::View call. (File_read::find_or_make_view): Update File_read::View::View call. * fileread.h: (File_read::File_read): Initialize whole_file_view_, remove contents_ (File_read::View::Data_ownership): New enum. (File_read::View::View): Replace bool mapped_ with Data_ownership argument. (File_read::View::mapped_): Remove (replaced by data_ownership_). (File_read::View::data_ownership_): New field. (File_read::contents_): Remove (replaced by whole_file_view_). (File_read::whole_file_view_): New field. * options.h (class General_options): Add --keep-files-mapped.
Diffstat (limited to 'gold/options.h')
-rw-r--r--gold/options.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gold/options.h b/gold/options.h
index cbb45b5..ef27de1 100644
--- a/gold/options.h
+++ b/gold/options.h
@@ -723,6 +723,12 @@ class General_options
DEFINE_special(just_symbols, options::TWO_DASHES, '\0',
N_("Read only symbol values from FILE"), N_("FILE"));
+ DEFINE_bool(keep_files_mapped, options::TWO_DASHES, '\0',
+ sizeof(void*) >= 8,
+ N_("Map whole files to memory (default on 64-bit hosts)"),
+ N_("Map relevant file parts to memory (default on 32-bit "
+ "hosts)"));
+
DEFINE_special(library, options::TWO_DASHES, 'l',
N_("Search for library LIBNAME"), N_("LIBNAME"));