diff options
author | Sterling Augustine <saugustine@google.com> | 2012-09-10 19:16:33 +0000 |
---|---|---|
committer | Sterling Augustine <saugustine@google.com> | 2012-09-10 19:16:33 +0000 |
commit | c891b3f924c4fb5fd06b71cabe74ffe74dcffa48 (patch) | |
tree | 000f9a73bef7fb5dd006e16d93046ea82252458a /gold/gdb-index.cc | |
parent | 09be558e1074c285df631d3d8fa680135b4bd284 (diff) | |
download | gdb-c891b3f924c4fb5fd06b71cabe74ffe74dcffa48.zip gdb-c891b3f924c4fb5fd06b71cabe74ffe74dcffa48.tar.gz gdb-c891b3f924c4fb5fd06b71cabe74ffe74dcffa48.tar.bz2 |
2012-09-10 Sterling Augustine <saugustine@google.com>
* gdb-index.cc (Gdb_index::pubnames_read): New parameter.
(Gdb_index::pubtypes_read): New parameter.
(Gdb_index_info_reader::read_pubnames_and_pubtypes): Add parameters
to calls.
* gdb-index.h (Gdb_index): New fields pubnames_object_ and
pubtypes_object_.
Diffstat (limited to 'gold/gdb-index.cc')
-rw-r--r-- | gold/gdb-index.cc | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/gold/gdb-index.cc b/gold/gdb-index.cc index 6666988..51d0816 100644 --- a/gold/gdb-index.cc +++ b/gold/gdb-index.cc @@ -864,7 +864,8 @@ Gdb_index_info_reader::read_pubnames_and_pubtypes(Dwarf_die* die) &pubnames_shndx); if (pubnames_offset != -1) { - if (this->gdb_index_->pubnames_read(pubnames_shndx, pubnames_offset)) + if (this->gdb_index_->pubnames_read(this->object(), pubnames_shndx, + pubnames_offset)) ret = true; else { @@ -890,7 +891,8 @@ Gdb_index_info_reader::read_pubnames_and_pubtypes(Dwarf_die* die) &pubtypes_shndx); if (pubtypes_offset != -1) { - if (this->gdb_index_->pubtypes_read(pubtypes_shndx, pubtypes_offset)) + if (this->gdb_index_->pubtypes_read(this->object(), + pubtypes_shndx, pubtypes_offset)) ret = true; else { @@ -961,8 +963,10 @@ Gdb_index::Gdb_index(Output_section* gdb_index_section) symtab_offset_(0), cu_pool_offset_(0), stringpool_offset_(0), + pubnames_object_(NULL), pubnames_shndx_(0), pubnames_offset_(0), + pubtypes_object_(NULL), pubtypes_shndx_(0), pubtypes_offset_(0) { @@ -1034,10 +1038,12 @@ Gdb_index::add_symbol(int cu_index, const char* sym_name) // OFFSET in section SHNDX bool -Gdb_index::pubnames_read(unsigned int shndx, off_t offset) +Gdb_index::pubnames_read(const Relobj* object, unsigned int shndx, off_t offset) { - bool ret = (this->pubnames_shndx_ == shndx + bool ret = (this->pubnames_object_ == object + && this->pubnames_shndx_ == shndx && this->pubnames_offset_ == offset); + this->pubnames_object_ = object; this->pubnames_shndx_ = shndx; this->pubnames_offset_ = offset; return ret; @@ -1047,10 +1053,12 @@ Gdb_index::pubnames_read(unsigned int shndx, off_t offset) // OFFSET in section SHNDX bool -Gdb_index::pubtypes_read(unsigned int shndx, off_t offset) +Gdb_index::pubtypes_read(const Relobj* object, unsigned int shndx, off_t offset) { - bool ret = (this->pubtypes_shndx_ == shndx + bool ret = (this->pubtypes_object_ == object + && this->pubtypes_shndx_ == shndx && this->pubtypes_offset_ == offset); + this->pubtypes_object_ = object; this->pubtypes_shndx_ = shndx; this->pubtypes_offset_ = offset; return ret; |