aboutsummaryrefslogtreecommitdiff
path: root/gold/parameters.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-11-22 00:05:51 +0000
committerIan Lance Taylor <iant@google.com>2007-11-22 00:05:51 +0000
commitc79126688f8211ab17a893c5e80b09811d424fc1 (patch)
tree23a727f6718dc203a4e3b9ef1575e8a10b6f0d80 /gold/parameters.h
parent06d063c072d0e247751535bc5e394aa7b8be3b0f (diff)
downloadgdb-c79126688f8211ab17a893c5e80b09811d424fc1.zip
gdb-c79126688f8211ab17a893c5e80b09811d424fc1.tar.gz
gdb-c79126688f8211ab17a893c5e80b09811d424fc1.tar.bz2
Add threading support.
Diffstat (limited to 'gold/parameters.h')
-rw-r--r--gold/parameters.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/gold/parameters.h b/gold/parameters.h
index 3186b6d..4e135c6 100644
--- a/gold/parameters.h
+++ b/gold/parameters.h
@@ -47,6 +47,14 @@ class Parameters
errors() const
{ return this->errors_; }
+ // Whether to use threads.
+ bool
+ threads() const
+ {
+ gold_assert(this->options_valid_);
+ return this->threads_;
+ }
+
// Return the output file name.
const char*
output_file_name() const
@@ -166,6 +174,15 @@ class Parameters
return this->export_dynamic_;
}
+ // Return the debug flags. These are the flags for which we should
+ // report internal debugging information.
+ unsigned int
+ debug() const
+ {
+ gold_assert(this->options_valid_);
+ return this->debug_;
+ }
+
// Whether we are doing a static link--a link in which none of the
// input files are shared libraries. This is only known after we
// have seen all the input files.
@@ -239,6 +256,8 @@ class Parameters
// Whether the fields set from the options are valid.
bool options_valid_;
+ // Whether to use threads.
+ bool threads_;
// The output file name.
const char* output_file_name_;
// The type of the output file.
@@ -259,6 +278,8 @@ class Parameters
int optimization_level_;
// Whether the -E/--export-dynamic flag is set.
bool export_dynamic_;
+ // The debug flags.
+ unsigned int debug_;
// Whether the doing_static_link_ field is valid.
bool is_doing_static_link_valid_;
@@ -287,6 +308,13 @@ extern void set_parameters_size_and_endianness(int size, bool is_big_endian);
// Set whether we are doing a static link.
extern void set_parameters_doing_static_link(bool doing_static_link);
+// Return whether we are doing a particular debugging type. The
+// argument is one of the flags from debug.h.
+
+inline bool
+is_debugging_enabled(unsigned int type)
+{ return (parameters->debug() & type) != 0; }
+
} // End namespace gold.
#endif // !defined(GOLD_PARAMETERS_H)