// dwarf_reader.h -- parse dwarf2/3 debug information for gold -*- C++ -*-
-// Copyright 2007, 2008 Free Software Foundation, Inc.
+// Copyright 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
int header_num; // which file-list to use (i.e. which .o file are we in)
int file_num; // a pointer into files_
int line_num; // the line number in the source file
- // Offsets are unique within a section, so that's a sufficient sort key.
+
+ // When we add entries to the table, we always use the last entry
+ // with a given offset. Given proper DWARF info, this should ensure
+ // that the offset is a sufficient sort key.
bool operator<(const Offset_to_lineno_entry& that) const
{ return this->offset < that.offset; }
};
// Initializes a .debug_line reader for a given object file.
// If SHNDX is specified and non-negative, only read the debug
// information that pertains to the specified section.
- Sized_dwarf_line_info(Object* object, off_t read_shndx = -1U);
+ Sized_dwarf_line_info(Object* object, unsigned int read_shndx = -1U);
private:
std::string
// If SHNDX is non-negative, only store debug information that
// pertains to the specified section.
void
- read_line_mappings(Object*, off_t shndx);
+ read_line_mappings(Object*, unsigned int shndx);
// Reads the relocation section associated with .debug_line and
// stores relocation information in reloc_map_.
// discard all line information that doesn't pertain to the given
// section.
const unsigned char*
- read_lines(const unsigned char* lineptr, off_t shndx);
+ read_lines(const unsigned char* lineptr, unsigned int shndx);
// Process a single line info opcode at START using the state
// machine at LSM. Return true if we should define a line using the
// This has relocations that point into buffer.
Track_relocs<size, big_endian> track_relocs_;
+ // The type of the reloc section in track_relocs_--SHT_REL or SHT_RELA.
+ unsigned int track_relocs_type_;
// This is used to figure out what section to apply a relocation to.
const unsigned char* symtab_buffer_;