aboutsummaryrefslogtreecommitdiff
path: root/gold/fileread.cc
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2015-02-02 11:47:58 -0800
committerCary Coutant <ccoutant@google.com>2015-02-03 20:03:41 -0800
commit8265ef950202a4bf0d3444802ad5d7087b4b185d (patch)
tree32afb08f5da779e88b50937762158262b1e13839 /gold/fileread.cc
parentb10c5c5012c3accfefa3f3847d3eb83a788bdbbf (diff)
downloadgdb-8265ef950202a4bf0d3444802ad5d7087b4b185d.zip
gdb-8265ef950202a4bf0d3444802ad5d7087b4b185d.tar.gz
gdb-8265ef950202a4bf0d3444802ad5d7087b4b185d.tar.bz2
Add extra debugging output for files and descriptors.
gold/ * descriptors.cc (Descriptors::open): Set artificially-low limit for file descriptors when debugging enabled. Add debug output. (Descriptors::release): Add debug output. (Descriptors::close_some_descriptor): Likewise. (Descriptors::close_all): Likewise. * fileread.cc (File_read::lock): Likewise. (File_read::unlock): Likewise.
Diffstat (limited to 'gold/fileread.cc')
-rw-r--r--gold/fileread.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/gold/fileread.cc b/gold/fileread.cc
index cf70981..0bd8320 100644
--- a/gold/fileread.cc
+++ b/gold/fileread.cc
@@ -293,6 +293,7 @@ void
File_read::lock(const Task* task)
{
gold_assert(this->released_);
+ gold_debug(DEBUG_FILES, "Locking file \"%s\"", this->name_.c_str());
this->token_.add_writer(task);
this->released_ = false;
}
@@ -302,6 +303,7 @@ File_read::lock(const Task* task)
void
File_read::unlock(const Task* task)
{
+ gold_debug(DEBUG_FILES, "Unlocking file \"%s\"", this->name_.c_str());
this->release();
this->token_.remove_writer(task);
}