aboutsummaryrefslogtreecommitdiff
path: root/gold/dwarf_reader.cc
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2010-11-17 01:53:22 +0000
committerCary Coutant <ccoutant@google.com>2010-11-17 01:53:22 +0000
commitab8056e082820630f09bde048adbebbee05d6ddb (patch)
treebfa0be5a4b8fb925c898a558e8d01abb650ca9f1 /gold/dwarf_reader.cc
parent53403d2c53af7d194b6034af03ea09658ad21c97 (diff)
downloadgdb-ab8056e082820630f09bde048adbebbee05d6ddb.zip
gdb-ab8056e082820630f09bde048adbebbee05d6ddb.tar.gz
gdb-ab8056e082820630f09bde048adbebbee05d6ddb.tar.bz2
* dwarf_reader.cc (Sized_dwarf_line_info::Sized_dwarf_line_info):
Check for ".zdebug_line".
Diffstat (limited to 'gold/dwarf_reader.cc')
-rw-r--r--gold/dwarf_reader.cc23
1 files changed, 13 insertions, 10 deletions
diff --git a/gold/dwarf_reader.cc b/gold/dwarf_reader.cc
index c0188fb..e83e7fb 100644
--- a/gold/dwarf_reader.cc
+++ b/gold/dwarf_reader.cc
@@ -68,16 +68,19 @@ Sized_dwarf_line_info<size, big_endian>::Sized_dwarf_line_info(Object* object,
directories_(), files_(), current_header_index_(-1)
{
unsigned int debug_shndx;
- for (debug_shndx = 0; debug_shndx < object->shnum(); ++debug_shndx)
- // FIXME: do this more efficiently: section_name() isn't super-fast
- if (object->section_name(debug_shndx) == ".debug_line")
- {
- section_size_type buffer_size;
- this->buffer_ = object->section_contents(debug_shndx, &buffer_size,
- false);
- this->buffer_end_ = this->buffer_ + buffer_size;
- break;
- }
+ for (debug_shndx = 1; debug_shndx < object->shnum(); ++debug_shndx)
+ {
+ // FIXME: do this more efficiently: section_name() isn't super-fast
+ std::string name = object->section_name(debug_shndx);
+ if (name == ".debug_line" || name == ".zdebug_line")
+ {
+ section_size_type buffer_size;
+ this->buffer_ = object->section_contents(debug_shndx, &buffer_size,
+ false);
+ this->buffer_end_ = this->buffer_ + buffer_size;
+ break;
+ }
+ }
if (this->buffer_ == NULL)
return;